Side navigation
#11437 closed bug (worksforme)
Opened March 05, 2012 06:14AM UTC
Closed March 05, 2012 10:50AM UTC
Last modified July 13, 2012 08:50AM UTC
((f.event.special[r.origType] || {}).handle || r.handler).apply is not a function
Reported by: | cowwoc@bbs.darktech.org | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | event | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
FireFox 10.0.2 throws "((f.event.special[r.origType] || {}).handle || r.handler).apply is not a function" for the following test-case:
<!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script type="text/javascript" src="https://www.google.com/jsapi"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script> <script type="text/javascript"> $(function() { $("#calculator").dialog( { title: "Please enter the following information", width: 500 }); $("#income").change($(function(event) { console.log(event); })); }); </script> </head> <body> <div id="calculator"> Income$<input id="income" pattern="^\\d+((\\.|\\,)\\d{2})?$"/> </div> </body> </html>
1. Select input field.
2. Enter any number.
3. Hit TAB.
4. Exception thrown.
Reproducible always.
Attachments (0)
Change History (2)
Changed March 05, 2012 10:50AM UTC by comment:1
component: | unfiled → event |
---|---|
priority: | undecided → low |
resolution: | → worksforme |
status: | new → closed |
Changed July 13, 2012 08:50AM UTC by comment:2
I got the same exception when I had this line code:
$x = $("table").select('tbody');
I know now that this is a very stupid line of code, but the error message from firefox is not really useful.
My solution was to remove this line of code.
Rather than passing $(function(event){ ... }) to el.change(), simply pass function(event){..} as follows (and as defined by our docs) and you won't experience any exceptions when tabbing. http://jsfiddle.net/mprQp/1/. Your console.log will work absolutely fine and there's no (as far as I can discern) reason to be wrapping your callback with $ here.