[OpenLayers-Users] Event object in Firefox produces errors with getPreventDefault method

Mike Leahy mgl.gis at gmail.com
Fri Apr 8 23:55:29 EDT 2011


Hello List,

After upgrading to jQuery 1.5.2, I encountered an error that I have been able
to track down to the new use of getPreventDefault.  It seems that this method
on the event object passed to event handlers in OpenLayers produces errors in
Firefox (other browsers don't have this problem).

====================================
uncaught exception: [Exception... "Illegal operation on WrappedNative
prototype object"  nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)"
location: "JS frame ::
http://localhost/openlayers/examples/clickEventsDebug.html :: <TOP_LEVEL> ::
line 36"  data: no]

Line 0
====================================

I encountered this because in some parts of my application I have used
jQuery's $.event.fix() method to normalize parameters of the event object.  As-
of jQuery 1.5.2, this includes a line that calls the getPreventDefault()
method on the event object.

I was able to work a sample script to consistently reproduce this error,
located here: http://pastebin.com/SRVnBrwM

I think this might be considered a bug, but I'd like to get comments from
anyone on the list before opening a ticket.

Best regards,
Mike


More information about the Users mailing list