-
Notifications
You must be signed in to change notification settings - Fork 2k
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
processing bindings in a specific order #368
Comments
The mental model here is that bindings are resolved asynchronously and there is no guarantee of resolution ordering. If two bindings depend on each other than this dependency must be explicit. In this exact case, the value binding to input is the best way to see the live value of the input. If the use case here is more complicated, we'll need more details to help recommend a proper course. |
Yup. The issue is what order the attributes are returned by the user agent. This is another good reason to let event binding be a concern of NodeBind. If that's the case, we can ensure the ordering of (1) event handlers (2) observer change callbacks. |
This issue can be solved? |
Today, template-binding processes attribute bindings in the order that are returned by the browser (code). This may be the lexical order or something else (FF and Chrome are not consistent here, for example).
Normally this is not an issue, but when using 'on-foo' handlers in polymer, it becomes more obvious when some events are fired in a different order than the one specified in the template code.
Here is a concrete example:
If you type a letter at the end of the textbox, you'll see the following printed in Chrome:
But the following printed in FF:
This causes the odd effect that the handler is invoked before the bindings are propagated.
Could/should polymer or template-binding do something special here?
The text was updated successfully, but these errors were encountered: