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

Input field focus issue on Safari #903

Open carmoreira opened 7 years ago

carmoreira commented 7 years ago

On version 1.6.3, when using Safari, after a date/time is set, if we go back to edit the value manually instead of choosing from the date/time picker, the input field looses the cursor focus, allowing us to edit maybe one or two characters only. In a scenario where users would also write the date/time manually it's a bit annoying. This didn't happen on version 1.5.2. Not sure what's causing this.

gnomical commented 7 years ago

I am also having this issue. Its obstructing the ability to manually edit the input fields. Which is unfortunate because other than this issue the features meet my needs very well.

gnomical commented 7 years ago

I have verified that the bug is introduced in 1.6.0

Legarndary commented 7 years ago

Any fix for this?

toshniba commented 3 years ago

Seems it has to do with setSelectionRange which obviously is implemented something different in Safari. I tried w/o that line and it works. Don't know why we need that there anyhow. Maybe one can fix it in a pull request as I have no time and knowledge for that. thx!

rmh-dev commented 3 years ago

I'm experiencing the same issue. But it appears only, if I set a custom dateFormat (e.g. 'dd.mm.yy') and the focus is lost only, when typing of the date is finished. I fixed it with a WORKAROUND:

My guess is, that it somehow has to do with the altField-Funktionality?...