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
select binding: order of 'options' and 'value' matters in FF and Chrome #58
Comments
getting the same in v1.2.1 |
your jsfiddle example is working for me in chrome 12 on a mac. |
philmueller's example is still broken in chrome 13 on pc. Here's another case where the order of the bind properties matters. |
Indeed, the order of bindings is meant to be significant. They run in the order they appear in your data-bind attribute. However, the behavior on IE should not differ from Firefox/Chrome, so there is definitely some bug here. I'll investigate. |
Does binding order being significant make sense though? I understand that this is how it currently works, but wouldn't it be better and more intuitive if the order was not significant? In the case of the options and value bindings working together, wouldn't it be easy enough to make the options binding check for a value binding and apply it? There would definitely need to be some thought put into exactly how the bindings would collaborate with each other, but I think the framework would be better for it. |
In general, you can put custom code into bindings, so it's always possible that what you do there cares about order of application. For the built-in bindings, I agree it's desirable to make them as order-agnostic as possible. The options/value combination is the only common scenario where ordering is noticable, so I'd definitely like to smooth that out. |
Thanks very much for reporting this, and for providing the test cases. Now fixed in the latest source code. Sorry it took such a long time! |
The order of 'options' and 'value' seems to matter in a select binding, at least for non-IE browsers. This http://jsfiddle.net/gfCza/ works as expected in IE, but not in Firefox/Chrome (the second example doesn't show a result until you select something in the combobox).
The text was updated successfully, but these errors were encountered: