Skip to content

Input field focus issue on Safari #903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
carmoreira opened this issue Dec 22, 2016 · 5 comments
Open

Input field focus issue on Safari #903

carmoreira opened this issue Dec 22, 2016 · 5 comments

Comments

@carmoreira
Copy link

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
Copy link

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
Copy link

I have verified that the bug is introduced in 1.6.0

@Legarndary
Copy link

Any fix for this?

@toshniba
Copy link

toshniba commented Aug 20, 2020

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
Copy link

rmh-dev commented Jun 2, 2021

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:

  • Set option timeInput: true
  • Set Focus back to Input after typing using JQuery

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

JulianKniephoff added a commit to JulianKniephoff/opencast that referenced this issue Nov 6, 2023
When you try to manually edit the time of a `datetimepicker`
(for example trying to change the start date/time metadata field
of an event), instead of using the combo boxes from the picker,
Safari does weird things to your focus, which makes the task
really difficult.

This is a [known issue](trentrichardson/jQuery-Timepicker-Addon#903)
in the (seemingly unmaintained) `jqueryui-timepicker-addon` library.
Luckily this patch seems to work around it.

It's a bit of a hack, but the option we are setting here is related
to a feature we are not using, so I don't see the harm. 🤷‍♀️
JulianKniephoff added a commit to JulianKniephoff/opencast that referenced this issue Nov 6, 2023
When you try to manually edit the time of a `datetimepicker`
(for example trying to change the start date/time metadata field
of an event), instead of using the combo boxes from the picker,
Safari does weird things to your focus, which makes the task
really difficult.

This is a [known issue](trentrichardson/jQuery-Timepicker-Addon#903)
in the (seemingly unmaintained) `jqueryui-timepicker-addon` library.
Luckily this patch seems to work around it.

It's a bit of a hack, but the option we are setting here is related
to a feature we are not using, so I don't see the harm. 🤷‍♀️

See also https://trentrichardson.com/examples/timepicker/#alt_examples
in the tab "Options" and "Examples" to (try to) understand
what the option means (you might also need
https://api.jqueryui.com/datepicker/#option-altField)
and so verify that the bug is not Opencast, but in the library already.
JulianKniephoff added a commit to JulianKniephoff/opencast that referenced this issue Nov 6, 2023
When you try to manually edit the time of a `datetimepicker`
(for example trying to change the start date/time metadata field
of an event), instead of using the combo boxes from the picker,
Safari does weird things to your focus, which makes the task
really difficult.

This is a [known issue](trentrichardson/jQuery-Timepicker-Addon#903)
in the (seemingly unmaintained) `jqueryui-timepicker-addon` library.
Luckily this patch seems to work around it.

It's a bit of a hack, but the thing we are tampering with here
is related to a feature we are not using, so I don't see the harm. 🤷‍♀️

See also https://trentrichardson.com/examples/timepicker/#alt_examples
in the tab "Options" and "Examples" to (try to) understand
what the option means (you might also need
https://api.jqueryui.com/datepicker/#option-altField)
and so verify that the bug is not Opencast, but in the library already.
JulianKniephoff added a commit to JulianKniephoff/opencast that referenced this issue Nov 6, 2023
When you try to manually edit the time of a `datetimepicker`
(for example trying to change the start date/time metadata field
of an event), instead of using the combo boxes from the picker,
Safari does weird things to your focus, which makes the task
really difficult.

This is a [known issue](trentrichardson/jQuery-Timepicker-Addon#903)
in the (seemingly unmaintained) `jqueryui-timepicker-addon` library.
Luckily this patch seems to work around it.

It's a bit of a hack, but the thing we are tampering with here
is related to a feature we are not using, so I don't see the harm. 🤷‍♀️

See also https://trentrichardson.com/examples/timepicker/#alt_examples
in the tab "Options" and "Examples" to (try to) understand
what the option means (you might also need
https://api.jqueryui.com/datepicker/#option-altField)
and so verify that the bug is not Opencast, but in the library already.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants