[Bug] Input checkbox value returns "on" in Internet Explorer 11
See original GitHub issueBinding the value
attribute of an input
(checkbox) tag to a controller/component property seems broken in IE11.
See a minimal example here: https://cspanring.github.io/ie11-input-value/ (code)
template:
<input value={{inputValue}} type="checkbox" onclick={{action "getCheckboxValue"}}>My value is {{inputValue}}
controller:
inputValue: 3,
actions: {
getCheckboxValue() {
let value = document.querySelector('input[type=checkbox]').value;
// in IE11 value will be "on"
alert('My value is: ' + value);
},
},
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:11 (3 by maintainers)
Top Results From Across the Web
IE 11 Checkbox Delay Bug? - MSDN - Microsoft
The issue we've noticed with IE 11 is that checking one of them causes a delay/pause before it's actually checked - in the...
Read more >Internet Explorer 11 - Not able to check input type checkbox in ...
Any ideas that i can make checkbox to be checked by single click as normal in IE 11. Anyone facing this issue and...
Read more >Checkbox change event issue with Internet Explorer 11
It appears that the 'checked' status of the check box is updated AFTER the 'change' event occurs; but only on IE11. This results...
Read more >Checkbox not working in IE - JavaScript - SitePoint Forums
In IE nothing happens when i click the submit button, i don't get any error, even if the checkbox is ticked still nothing...
Read more >checked - CSS: Cascading Style Sheets - MDN Web Docs
The :checked CSS pseudo-class selector represents any radio ( ) ... Checkbox element, when checked */ input[type="checkbox"]:checked ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey friends. I’ve worked around this in the past with radio buttons too (see #14712). The gist is that IE11 cares a lot about the order of your attributes. In general I’ve wrapped up native radio buttons in a component that has a
didRender
hook that looks like this:Thank you so much @thirdwheel You saved my day!