I was debugging a strange JavaScript issue, and noticed what I think might be a browser bug in IE11. I'm posting here on StackOverflow as a sanity-check -- and maybe to make sure that someone else with IE11 can reproduce this.
The issue is that when a hidden input's value contains a HTML entity, an input
event is triggered on the element immediately on page load.
Take a look at this isolated reproduction here: http://dobt-misc.s3.amazonaws.com/ie_11_bug.html
The source code of the page:
<!doctype html>
<html>
<head>
<script>
document.addEventListener('DOMContentLoaded', function(){
document.getElementById('foo').addEventListener('input', function(){
alert('Crap!');
});
});
</script>
</head>
<body>
In IE11, refresh the page. You will see an alert, whereas in other browsers, you will not see an alert.
<form>
<input id="foo" type="hidden" name="utf8" value="✓" />
</form>
</body>
</html>
Can someone help me confirm whether or not this is a browser bug? Or maybe I'm doing something wrong?
I do not understand the error that I am seeing, nor what I should change in my ESLint configurations to fix it, after digging around for a while. I have a snippet of JS code using ECMA Version 6 (ES6)...
I do not understand the error that I am seeing, nor what I should change in my ESLint configurations to fix it, after digging around for a while. I have a snippet of JS code using ECMA Version 6 (ES6)...
Here m using angular to populate data in my view.. this is just a sample.. on clicking on the particular ageGroupCategory i need to add data into a form and then i want to save the entire data ...
Here m using angular to populate data in my view.. this is just a sample.. on clicking on the particular ageGroupCategory i need to add data into a form and then i want to save the entire data ...
how to sort the name in array list by alphabet in javascript, I tried with this code const sample = [ { name: "AddMain", mesg: "test000" }, { name: "Ballside", ...
how to sort the name in array list by alphabet in javascript, I tried with this code const sample = [ { name: "AddMain", mesg: "test000" }, { name: "Ballside", ...
I want left margin of every element in a class to have 70px left margin more than the last one. i.e. marginLeft += 70px; Here's what I have tried: function MarginLeftFunc() { var ...
I want left margin of every element in a class to have 70px left margin more than the last one. i.e. marginLeft += 70px; Here's what I have tried: function MarginLeftFunc() { var ...