Handlebars dropdown list "selected" option does not work on IE8/9 #496
Comments
Could you please put this on a Github repository so that the instructions
Also could you explain precisely how to repro the issue - which browser to On Tue, Nov 20, 2012 at 11:14 AM, Utkarsh Sengar
|
Setup
ExpectedAs the page loads, the default option in the dropdown should be: "File not found" (because of the handlerbar helper in test.js: line 6 and 10 ObservedOn Firefox 16 and chrome, it works fine: http://i.imgur.com/czHJI.png |
Thanks for the quick response! We'll investigate this but since we are On Tue, Nov 20, 2012 at 11:35 AM, Utkarsh Sengar
|
This is fixed on the |
When a <SELECT> was rendered on IE9 (or older) via DomUtils.htmlToFragment, the hack we used somehow failed to properly set some attributes; they would show up in innerHTML but not affect property values. eg, SELECTED would show up in an OPTION's innerHTML but option.selected would not be set (nor would the parent SELECT's value or selectedIndex). Fix this by replacing a mergeAttributes call with an explicit attribute copying loop. Also, add the helpers setElementValue and getElementValue to DomUtils, which are used both in the test of this fix and will be used in a future change. Fixes #496.
When a <SELECT> was rendered on IE9 (or older) via DomUtils.htmlToFragment, the hack we used somehow failed to properly set some attributes; they would show up in innerHTML but not affect property values. eg, SELECTED would show up in an OPTION's innerHTML but option.selected would not be set (nor would the parent SELECT's value or selectedIndex). Fix this by replacing a mergeAttributes call with an explicit attribute copying loop. Also, add the helpers setElementValue and getElementValue to DomUtils, which are used both in the test of this fix and will be used in a future change. Fixes #496.
When a <SELECT> was rendered on IE9 (or older) via DomUtils.htmlToFragment, the hack we used somehow failed to properly set some attributes; they would show up in innerHTML but not affect property values. eg, SELECTED would show up in an OPTION's innerHTML but option.selected would not be set (nor would the parent SELECT's value or selectedIndex). Fix this by replacing a mergeAttributes call with an explicit attribute copying loop. Also, add the helpers setElementValue and getElementValue to DomUtils, which are used both in the test of this fix and will be used in a future change. Fixes #496.
When a <SELECT> was rendered on IE9 (or older) via DomUtils.htmlToFragment, the hack we used somehow failed to properly set some attributes; they would show up in innerHTML but not affect property values. eg, SELECTED would show up in an OPTION's innerHTML but option.selected would not be set (nor would the parent SELECT's value or selectedIndex). Fix this by replacing a mergeAttributes call with an explicit attribute copying loop. Also, add the helpers setElementValue and getElementValue to DomUtils, which are used both in the test of this fix and will be used in a future change. Fixes #496.
Steps to reproduce:
The dropdown "selected" option works fine on firefox and chrome. But does not work on IE8 or 9.
This has also been reported here: http://stackoverflow.com/questions/13465524/select-tag-default-selection-ignored-by-ie8-when-using-handlebars-with-meteor
The text was updated successfully, but these errors were encountered: