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")) || "" );
Duplicate of #12606.