trentrichardson / jQuery-Timepicker-Addon

Adds a timepicker to jQueryUI Datepicker
http://trentrichardson.com/examples/timepicker/
MIT License
2.66k stars 1.05k forks source link

Cursor loses focus in text input when you hand enter time value (only with Edge) #936

Open jeffreymergler opened 6 years ago

jeffreymergler commented 6 years ago

Using MS Edge browser (IE11, Chrome, FF all are OK) visit this example:

http://trentrichardson.com/examples/timepicker/

use the example with the label "Add only a timepicker:" and hand type in a time such as 11:00

On Edge the cursor focus bounces out of the input on each keystroke, You have to keep refocusing back into the field making hand entry of a time value really difficult. The other browsers are fine.

I can also recreate this in my application which implements the timepicker and in my app, I added this hack/fix from here: https://github.com/trentrichardson/jQuery-Timepicker-Addon/issues/848

I commented out:

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

and the problem seems to be solved. I haven't seen any regression from it and wondering if anyone else is relying on this and if this will make it into the release version?

jeffreymergler commented 6 years ago

p.s. I'm using jQuery Timepicker Addon - v1.6.3 - 2016-04-20