Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

select box models do not update bindings real time #294

Closed
arantius opened this issue Feb 28, 2011 · 1 comment
Closed

select box models do not update bindings real time #294

arantius opened this issue Feb 28, 2011 · 1 comment
Milestone

Comments

@arantius
Copy link
Contributor

Test case: https://gist.github.com/847923

Unlike other input fields (text, check box, radio), the select box will not update in real time, when changed via the keyboard. Its update is delayed until the field is blurred. I'm not sure whether this is by design or not, but it feels odd to me, when the rest of the angular environment is always bound for updates completely in real time.

@IgorMinar
Copy link
Contributor

You are bringing up an interesting bug. It's not that angular is not designed or implemented to update the value in realtime, this time it's the browsers treat the keyboard and mouse update differently.

In Chrome when you change the selection an onchange event is fired for the select element, so everything just works.

But apparently it doesn't work this way in Firefox as you noticed already. FF will fire onchange event only if you use mouse. If you use the keyboard the onchange event is fired only after the select element loses its focus.

We definitely want to make sure that the value is updated in realtime as one would expect angular apps to behave and we'll have to abstract away from this browser inconsistency in angular so that from the app developer/user perspective it just works everywhere.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

3 participants