-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Polymer select bind value on firefox #15195
Comments
This comment was originally written by [email protected] SDK and polymer ver: 0.8.10 |
Added Area-Polymer, Triaged labels. |
This comment was originally written by [email protected] Upgrade to SDK 1.0.2_r30821 and polymer 0.9.1+1, the issue still exists. |
This comment was originally written by [email protected] Upgrade to SDK 1.0.3.0_r30939 and polymer 0.9.2+1, the issue still exists. |
I was able to reproduce the problem. There seems to be a timing issue, but I'm not certain yet where this is coming from. Note, I found two ways to workaround the problem. You can use any of these until we find a proper fix. * workaround #1: add a 'scheduleMicrotask' in the change handler
Here is a simplified example illustrating the problem and the workarounds: <polymer-element name="x-test"> // the problem: prints new-id in chrome, old-id in FF // workaround #1: prints new-id in both chrome and FF // workaround #2: this is called when currentId == newV in both chrome and FF: |
Ok - turns out that the problem is that the order of the attributes returned in FF and in chrome is different. So, when template_binding is processing registration of bindings it finds 'value' and 'on-change' in that order in Chrome, but in the opposite order in FF. For this reason, the on-change event is fired before the currentId is updated. Here is an even simpler example that illustrates the problem: <polymer-element name="x-test"> If you type 'd' at the end of the input box, you'll see: 0:abcd in chrome, but you'll see: in FF This problem exists also in polymer.js, so I created this bug in their repo: We'll wait for them to resolve this, and we'll update our package once they fix it. For now, the workarounds mentioned above should be good enough to avoid this problem. Added this to the 1.1 milestone. |
Added Waiting label. |
Added Library-Polymer label. |
Removed Area-Polymer label. |
Removed Library-Polymer label. |
Added Polymer-P-2 label. |
Removed this from the Later milestone. |
Removed Polymer-P-2 label. |
Removed Polymer-Milestone-Later label. |
This issue has been moved to dart-archive/polymer-dart#93. |
This issue was originally filed by [email protected]
What steps will reproduce the problem?
<select value="{{orgId}}" on-change="{{orgChange}}">
<option template repeat="{{organization in dsOrganizations}}" value="{{organization['orgId']}}">{{organization['name']}}</option>
</select>
note: dsOrganizations is dict.
What is the expected output? What do you see instead?
The above code snippet run on chrome, orgChange event can get the correct bind value orgId.
But run on firefox 25, orgChange event can't get the correct bind value orgId, the orgId value is not current selected value, it seems is previous selected value.
What version of the product are you using? On what operating system?
Please provide any additional information below.
The text was updated successfully, but these errors were encountered: