Bug Tracker

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:


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 ) {"
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js"></script>
  $(function() {
    window.onerror = function(e) { window.alert(e); };
    var i = 0;
    $('body').delegate('div', 'mouseleave', function() {
<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>

Change History (3)

comment:2 Changed 12 years ago by sereda

The bug is not reproducing on Firefox 3.6.18

comment:3 Changed 12 years ago by Rick Waldron

Component: unfiledevent
Priority: undecidedlow
Resolution: wontfix
Status: newclosed

Firefox 3.5 is obsolete and no longer supported in terms of writing new code to satisfy edge case bugs .

Note: See TracTickets for help on using tickets.