Bug 131676 - 'mousewheel'-event is not fired inside an iFrame under certain conditions
Summary: 'mousewheel'-event is not fired inside an iFrame under certain conditions
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-15 04:37 PDT by andreas.parusel
Modified: 2014-04-15 04:37 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andreas.parusel 2014-04-15 04:37:45 PDT
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.