in partnership with mediatemple

Ticket #948 (closed defect: invalid)

Opened 1 month ago

Last modified 2 days ago

Event tries to access .nodeType property of div.anonymos-div in Forefox 3

Reported by: Jed Owned by:
Type: defect Priority: minor
Milestone: Mootools version 1.2 Component: Core
Keywords: Cc:

Description

Hi,

(this may be related to #474)

Current SVN version of Mootools 1.2 breaks in Firefox 3 when the 'mouseout' event fires on an element that has been hidden, if the element is hidden and a textfield moves to under the cursor.

This would make the target element of the event the textfield, in theory, but Firefox throws the error "Permission denied to get property HTMLDivElement.nodeType".

This may actually be Mozilla's bug, in which case perhaps it should be logged there? I'm using Beta 5, I cannot reproduce it in Firefox 2.

To work around it in MooTools, simply change line 52 of Event.js (the initialize function) to read

while (related && related.nodeType == 3 && related.parentNode.className != 'anonymous-div') related = related.parentNode;

instead of

while (related && related.nodeType == 3) related = related.parentNode;

... possibly not the cleanest, but it does stop errors being thrown...

Change History

Changed 1 month ago by Jed

Update: It looks like the line I provided doesn't fix the problem as much as I thought I did.

Having reverted to Firefox 3 b4 this appears to not be a problem, so perhaps it's a bug introduced in b5 and Moz will fix it.

The real mystery is why the error is being thrown at all, when the fn is attempted if Browser.Engine.gecko == true (which it is).

Changed 1 month ago by Jed

More info:

Also might be related to ticket #809, also known as the bug that just won't die :-)

Changed 1 month ago by mattcoz

Yup, this is exactly the same problem as in ticket #809. Here is the bug I opened for it:

https://bugzilla.mozilla.org/show_bug.cgi?id=418280

I have a feeling it won't get fixed before FF3 goes final, as it is low on their priority list, but hopefully it does.

The fix I posted in the other ticket has been working for me though.

Changed 2 days ago by tomocchino

  • status changed from new to closed
  • resolution set to invalid

thanks for the report, lets hope mozilla takes care of this one so we dont need to add any more nasty hacks in Events

Note: See TracTickets for help on using tickets.