Solution (JavaScript Solution)
Date of the Solution
Sun Jul 19 16:00:25 2009
Fixed Versions
all of the affected
Description
Since the bug occurs when scripting is enabled, perhaps we can use that scripting to fix it. Here's the fixed demo:
Due to the nature of the bug, fixed demo is shown on a separate page.
- HTML Code:
<div>bar</div>
<noscript>CAN HAS SKRIPTZ! PLZ??! KTNX!</noscript>
- CSS Code:
noscript {
border: 5px solid #000;
background: #f00;
display: block;
width: 500px;
height: 100px;
}
- JavaScript Code:
window.onload = function () {
var els = document.getElementsByTagName('noscript');
for ( var i = 0; i < els.length; i++ ) {
els[i].style.display='none';
}
}
The only thing that our JavaScript script does is set display to none on all of the <noscript> elements in the page. Since now there are hidden from view, no bugs appear. Easy as pie, huh?