jQuery-Timepicker-Addon icon indicating copy to clipboard operation
jQuery-Timepicker-Addon copied to clipboard

Input loses focus when typing with picker open

Open brettwebster opened this issue 9 years ago • 12 comments
trafficstars

v1.6.1 (Chrome 46. Does not replicate in FF42 or IE11)

  • Open a picker
  • then click into the textbox and delete the hour
  • notice that the textbox no longer has focus preventing you from typing a new value from hour without first clicking into the textbox.

http://jsfiddle.net/brettwebster/L3BNw/60/

focus is handled differently in v1.3.1 http://jsfiddle.net/brettwebster/L3BNw/

brettwebster avatar Nov 25 '15 15:11 brettwebster

Confirming.

matjazpotocnik avatar Dec 11 '15 19:12 matjazpotocnik

To overcome this issue, I simply commented one line in jquery-ui-timepicker-addon.js :

this.$timeObj[0].setSelectionRange(sPos, ePos) (L893)

If it helps...

RipAbyss avatar Jan 12 '16 10:01 RipAbyss

Yes, it helps, thank you!

matjazpotocnik avatar Jan 12 '16 14:01 matjazpotocnik

+1

Commenting out setSelectionRange() also fixes the following issues for me:

  1. "Unspecified error" in IE when changing time in date/time ranges (reproduces in IE11)
  2. Date time picker steals the focus from "autofocus" input on page load (reproduces in Chrome 47.0.2526.111 m)

kindkaktus avatar Jan 20 '16 07:01 kindkaktus

+1

AdamWillden avatar Feb 22 '16 12:02 AdamWillden

+1 here too. It was messing with the input mask as well in a really annoying way.

Krokador avatar Mar 07 '16 14:03 Krokador

+1 helped me too. Thanks

JakubSvestka avatar Mar 10 '16 23:03 JakubSvestka

+1 Thanks a lot.

ahammani avatar May 06 '16 13:05 ahammani

+1 +1

hcharley avatar Jun 21 '16 02:06 hcharley

+1

luisjuniorj avatar Jun 21 '16 17:06 luisjuniorj

+1

tstackhouse avatar Jul 05 '16 20:07 tstackhouse

+1

kakutuzov avatar Sep 02 '16 14:09 kakutuzov