Bug 131676
| Summary: | 'mousewheel'-event is not fired inside an iFrame under certain conditions | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | andreas.parusel |
| Component: | UI Events | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
andreas.parusel
Preconditions:
A webpage living inside an iFrame contains a <script>-tag in which another script-element is programmatically created and its src-property is set to an external JavaScript-file:
<script>
var elem = document.createElement("script");
var head = document.getElementsByTagName("head")[0];
head.appendChild(elem);
elem.src = "externalScript.js";
</script>
Bug:
The setting of the script-element's src-property brakes the firing of mousewheel-events inside the iFrame (see attached example, where no 'mouse wheel' logs will appear in the console.)
Workaround:
If you put the statement
window.onmousewheel = function(){};
inside of a script-tag (not in an external JS-file!), then the webpage inside the iFrame reacts to mousewheel-events again.
Please find a reduced example demonstrating this bug and the found workaround attached.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |