Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#12658 closed bug (duplicate)

Error using delegated events with a selector with class .watch on Firefox

Reported by: david@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.0
Keywords: Cc:
Blocked by: Blocking:

Description

Delegating events with .on and specifying a classname of ".watch" causes an error on Firefox (15.0.1, Mac). Appears to do with a there being a function named watch in Gecko (https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/watch)?

See http://jsfiddle.net/wmNAR/1/ for a test.

$('div').on('click', 'p.watch', function(e) {console.log('this creates an error.')

Causes an error:

"TypeError: pattern.test is not a function"

On this line (4260):

return pattern.test( elem.className
(typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) "" );

Change History (2)

comment:1 Changed 11 years ago by dmethvin

Resolution: duplicate
Status: newclosed

Duplicate of #12606.

comment:2 Changed 11 years ago by david@…

Whoops, didn't look at the "Uncategorized" bugs, sorry.

Note: See TracTickets for help on using tickets.