H
herrmefisto
Guest
I found a minor bug in IE 11.
I have a simple html site with two buttons and img element.
Clicking on first button will open site in "fullscreen mode".
Clicking on second button will change img.src attribute. When image is loaded img element should fire "load" event.
So when you click on first button, then on the second one you will see the image.
The problem occurs when you press ESC in the meantime.
Steps to reproduce:
1. Click on button1 to open site in fullscreen mode.
2. Click on button2 to set image "src" attribute with a link to some image. When image is loaded (it should happen in less than one second) "load" event should be fired.
3. Press ESC button in specific moment: AFTER setting image "src" attribute and BEFORE image "load" event is fired (it's less than one second).
In result image is not loaded. Load event is not fired.
You need to press ESC very quickly to see the issue.
For other browsers (like e.q Chrome) it works fine.
I'm using Windows 10 Enterprise and Internet Explorer 11 Version: 11.523.17134.0 Update Versions: 11.0.105 (KB4480965)
This is sample code which you can use to reproduce issue:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Test IE</title>
<style type="text/css">
body, html {
width: 100%;
height: 100%;
}
.square {
width: 60%;
height: 60%;
background-color: green;
}
</style>
</head>
<body>
<button id="btn1">Button 1</button>
<button id="btn2">Button 2</button>
<img id="img1" class="square" />
<script type="text/javascript">
document.getElementById("btn1").addEventListener("click", onbuttonclicked1);
document.getElementById("btn2").addEventListener("click", onbuttonclicked2);
function onbuttonclicked1() {
var el = document.documentElement;
if (el.mozRequestFullScreen) {
el.mozRequestFullScreen();
}
else if (el.webkitRequestFullScreen) {
el.webkitRequestFullScreen();
}
else if (el.msRequestFullscreen) {
el.msRequestFullscreen();
}
}
function onbuttonclicked2(e) {
var img = document.getElementById("img1");
img.addEventListener("load", function (e) {
alert("image loaded");
});
img.setAttribute("src", "https://upload.wikimedia.org/wikipedia/commons/d/dd/Big_&_Small_Pumkins.JPG");
}
</script>
</body>
</html>
If this is not good place to report bug please let me know where I can do it.
Regards,
Wojciech
Continue reading...
I have a simple html site with two buttons and img element.
Clicking on first button will open site in "fullscreen mode".
Clicking on second button will change img.src attribute. When image is loaded img element should fire "load" event.
So when you click on first button, then on the second one you will see the image.
The problem occurs when you press ESC in the meantime.
Steps to reproduce:
1. Click on button1 to open site in fullscreen mode.
2. Click on button2 to set image "src" attribute with a link to some image. When image is loaded (it should happen in less than one second) "load" event should be fired.
3. Press ESC button in specific moment: AFTER setting image "src" attribute and BEFORE image "load" event is fired (it's less than one second).
In result image is not loaded. Load event is not fired.
You need to press ESC very quickly to see the issue.
For other browsers (like e.q Chrome) it works fine.
I'm using Windows 10 Enterprise and Internet Explorer 11 Version: 11.523.17134.0 Update Versions: 11.0.105 (KB4480965)
This is sample code which you can use to reproduce issue:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Test IE</title>
<style type="text/css">
body, html {
width: 100%;
height: 100%;
}
.square {
width: 60%;
height: 60%;
background-color: green;
}
</style>
</head>
<body>
<button id="btn1">Button 1</button>
<button id="btn2">Button 2</button>
<img id="img1" class="square" />
<script type="text/javascript">
document.getElementById("btn1").addEventListener("click", onbuttonclicked1);
document.getElementById("btn2").addEventListener("click", onbuttonclicked2);
function onbuttonclicked1() {
var el = document.documentElement;
if (el.mozRequestFullScreen) {
el.mozRequestFullScreen();
}
else if (el.webkitRequestFullScreen) {
el.webkitRequestFullScreen();
}
else if (el.msRequestFullscreen) {
el.msRequestFullscreen();
}
}
function onbuttonclicked2(e) {
var img = document.getElementById("img1");
img.addEventListener("load", function (e) {
alert("image loaded");
});
img.setAttribute("src", "https://upload.wikimedia.org/wikipedia/commons/d/dd/Big_&_Small_Pumkins.JPG");
}
</script>
</body>
</html>
If this is not good place to report bug please let me know where I can do it.
Regards,
Wojciech
Continue reading...