Side navigation
#11933 closed bug (invalid)
Opened June 19, 2012 05:58PM UTC
Closed June 23, 2012 01:30PM UTC
Last modified February 24, 2013 06:02PM UTC
IE8 & 9 : Get script error after trigger click() - SCRIPT5007: Unable to get value of the property 'disabled': object is null or undefined
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In both IE 8 & 9, getting script error below after trigger click().
SCRIPT5007: Unable to get value of the property 'disabled': object is null or undefined
jquery-min.js, line 113 character 246
From the debugger, notice in the f.event dispatcher method, the condition to check whether the target element is disabled, the child attribute "disable" is accessed before checking the parent object is null, in this case c.target was null, therefore calling c.target.disabled gets the error above.
if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){ ... }
Attachments (0)
Change History (4)
Changed June 19, 2012 11:31PM UTC by comment:1
Changed June 20, 2012 05:56PM UTC by comment:2
After visiting this issue some more, I found that it was caused by using live() to bind events to an object that's not yet exisiting. Replacing using on() or bind() in ready(), Fixed the problem. This problem only happened in IE(8 and 9) browsers.
This ticket can be closed as not a bug.
Changed June 23, 2012 01:30PM UTC by comment:3
resolution: | → invalid |
---|---|
status: | new → closed |
Changed February 24, 2013 06:02PM UTC by comment:4
Try that
Inside your Internet window
In the toolbar, go in Tool
After, go in Internet Options
And inside the tab: Advanced
Than inside the browsing section, take off the X in front of: Display anotification about every script error
Found the uncompressed code, for jquery 1.7.1.
event.target is null, therefore event.target.disabled gives the error SCRIPT5007: Unable to get value of the property 'disabled': object is null or undefined jquery-min.js, line 113 character 246
I looked in jquery 1.7.2, the same problem exist but the code is different:
in the for loop, cur.parentNode is null, if I switch it to
the if condition below breaks, as cur is still null. Had to add another null check before cur.disabled !== true to fix the problem.