#11437 closed bug (worksforme)
((f.event.special[r.origType] || {}).handle || r.handler).apply is not a function
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | event | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
{}).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>
- Select input field.
- Enter any number.
- Hit TAB.
- Exception thrown.
Reproducible always.
Change History (2)
comment:1 Changed 11 years ago by
Component: | unfiled → event |
---|---|
Priority: | undecided → low |
Resolution: | → worksforme |
Status: | new → closed |
comment:2 Changed 11 years ago by
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.
Note: See
TracTickets for help on using
tickets.
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.