Skip to content
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

Change event does not work as expected #85

Open
jenstornell opened this issue Sep 15, 2020 · 2 comments
Open

Change event does not work as expected #85

jenstornell opened this issue Sep 15, 2020 · 2 comments

Comments

@jenstornell
Copy link

I fire a change event on my input with datalist. In Chrome and Edge (native behaviour), it fire the event as soon as I press enter on an item. With the polyfill (in Firefox) the item is set to the input on enter, which means I need to press enter one more time in order for the event to fire.

@mfranzke
Copy link
Owner

@jenstornell thanks a lot for your feedback.

I've recognized that this seems to be the standard behaviour in Firefox for <datalist> HTML element, independently from the usage of this polyfill. So in general I agree with you that it's bad to have this inconsistency, but I sadly don't know the exact specified behaviour (either one might be incorrect). Have you already done some research on this aspect?
And what would you suggest? I think to remember that triggering an event in this case might be a little problematic, as we both wouldn't want to "browser (version) detect" and as well couldn't feature detect the differences in event handling, and that for should rather get aligned at the browser level than solving it within the polyfill.

@jenstornell
Copy link
Author

@mfranzke I've just noticed that it works differently in Chrome + Edge (native) compared to Firefox (polyfill). I've not investigated it more than that.

You can leave this open or close it depending on if you want / can fix it or not.

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

2 participants