Side navigation
#9672 closed bug (wontfix)
Opened June 26, 2011 06:59AM UTC
Closed June 26, 2011 02:06PM UTC
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:
1. Open code snippet below on Firefox 3.5.7.
2. Move mouse over yellow area and then over to a scrollbar.
3. 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>
Attachments (0)
Change History (3)
Changed June 26, 2011 07:04AM UTC by comment:1
Changed June 26, 2011 07:08AM UTC by comment:2
The bug is ''not'' reproducing on Firefox 3.6.18
Changed June 26, 2011 02:06PM UTC by comment:3
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/