Opened 9 years ago
Closed 9 years ago
#9565 closed bug (notabug)
error using _superApply() in IE8
Reported by: | sarah | Owned by: | sarah |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.widget | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Using jQuery 1.9.1 and jQuery UI 1.10.3 on IE8 or a later IE browser set to IE8 Browser and Document Modes. The call to _superApply() came from code inheriting jQuery UI widgets, but the error occurs in the jQuery UI code. The error marks line 86 of the jquery.ui.widget.js file (as displayed on github). The actual error states that 'Function.prototype.apply: argument is null or undefined'.
Example: http://jsfiddle.net/sarahu/JeBQd/
The code that causes the error:
_superApply = function( args ) { return base.prototype[ prop ].apply( this, args ); };
My quick solution that does not seem to cause problems anywhere else:
_superApply = function( args ) { if(args==undefined){return base.prototype[ prop ].apply( this);} else{return base.prototype[ prop ].apply( this, args );} };
Change History (5)
comment:1 follow-up: 2 Changed 9 years ago by
Owner: | set to sarah |
---|---|
Status: | new → pending |
comment:2 Changed 9 years ago by
Status: | pending → new |
---|
Replying to scott.gonzalez:
We'll definitely need a reduced test case showing the problem before we make any changes to this.
I've edited the example.
comment:3 Changed 9 years ago by
Status: | new → pending |
---|
In your fiddle you're calling _superApply without arguments, but this method has a required argument: http://api.jqueryui.com/jQuery.widget/#method-_superApply
Is there any reason why you're not calling this._superApply(arguments) or just this._super()?
comment:4 Changed 9 years ago by
Status: | pending → new |
---|
I do not recall why I made that decision. It could have been that I was following an erroneous (or outdated) example or that it was included along with a few other changes to fix bugs. Either way, your suggestion works.
Thanks
comment:5 Changed 9 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
We'll definitely need a reduced test case showing the problem before we make any changes to this.