Bug Tracker

Modify

Ticket #9672 (closed bug: wontfix)

Opened 3 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

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>

Change History

comment:1 Changed 3 years ago by sereda

comment:2 Changed 3 years ago by sereda

The bug is not reproducing on Firefox 3.6.18

comment:3 Changed 3 years ago by rwaldron

  • Priority changed from undecided to low
  • Resolution set to wontfix
  • Status changed from new to closed
  • Component changed from unfiled to event

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

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.