-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Have to clear field before typing new value on Firefox and IE11 #92
Comments
In looking into this a bit more, I see that selectionStart and selectionEnd don't work on Chrome. So my suggested fix won't work for number fields. There may not be a cross-browser way to do this without a polyfill or browser detection. |
is there any solution for this issue? Currently I'm facing the same problem in firefox |
I think selectionStart, selectionEnd actually works on Chrome, but not for number inputs. We're getting rid of numer inputs though in #88 - only it goes veeeery slowly due to personal reasons of mine. |
Subscribed to #88 thanks! |
@wojtekmaj let us know how we can help. This is something I recently ran into and would love to resolve |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days. |
Reacting to the stale label: This is still an issue and from a UX and Accessibility point of view a quiet mayor one. |
Absolutely agree. Removed the label. Investigated further. Here's where we are at:
|
Alright, fixed the issue on IE11 since it actually (contrary to the spec) supports My best idea is to simply skip this check for Firefox and let users type in invalid values in some cases, as this seems to be less harmful than them being unable to type over values. |
@wojtekmaj thanks for the fix! Can you tell when can the fix be pushed into a new release? |
Eh, sure, why not make one soul happy today. Released 4.4.4 :) |
The getSelectionString function in Input.js uses window.getSelection() which does not work in fields on Firefox or IE. This results in the inability to over-type numbers in the hours input field.
Please consider using HTMLInput.selectionStart, HTMLInput.selectionEnd and HTMLInput.value to extract the selection text instead.
Let me know if you'd like me to write a PR for this change.
The text was updated successfully, but these errors were encountered: