Skip to main content

Bug Tracker

Side navigation

#12658 closed bug (duplicate)

Opened October 05, 2012 03:44AM UTC

Closed October 05, 2012 01:18PM UTC

Last modified October 05, 2012 01:29PM UTC

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

Reported by: david@whatcould.com 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")) || "" );

Attachments (0)
Change History (2)

Changed October 05, 2012 01:18PM UTC by dmethvin comment:1

resolution: → duplicate
status: newclosed

Duplicate of #12606.

Changed October 05, 2012 01:29PM UTC by david@whatcould.com comment:2

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