Opened 12 years ago
Closed 12 years ago
#9672 closed bug (wontfix)
Access to event.relatedTarget causes "Permission denied" exception in Firefox 3.5.x
Reported by: | sereda | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | event | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When jQuery handles mouseenter/mouseleave events and accesses relatedTarget property, it may cause permission exception in Firefox 3.5.x. (Tested on 3.5.7)
This happens when the relatedTarget is a XUL elemented inserted into DOM - like a scrollbar (not sure how it works exactly).
This is similar to other bugs like #4469, and jQuery has some workaround code (for example, at "var withinElement" near line 3161 @ version 1.6.1) for some cases, however, the following sample code still throws exceptions.
Reproduction sequence:
- Open code snippet below on Firefox 3.5.7.
- Move mouse over yellow area and then over to a scrollbar.
- The exception in the console says "Permission denied to access property 'nodeType' from a non-chrome context if ( selector.nodeType ) {"
<html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js"></script> <script> $(function() { window.onerror = function(e) { window.alert(e); }; var i = 0; $('body').delegate('div', 'mouseleave', function() { $("#info").val(++i); }); }); </script> </head> <body> <input type="text" id="info"> <div style="overflow: scroll; height: 100px; width: 300px" id="x"> <div id="y" style="background: #ffc; height: 100px; width: 300px"></div> </div> </body> </html>
Change History (3)
comment:1 Changed 12 years ago by
comment:3 Changed 12 years ago by
Component: | unfiled → event |
---|---|
Priority: | undecided → low |
Resolution: | → wontfix |
Status: | new → closed |
Firefox 3.5 is obsolete and no longer supported in terms of writing new code to satisfy edge case bugs .
jsFiddle: http://jsfiddle.net/bnVML/1/