Opened 7 years ago

Closed 7 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 Changed 7 years ago by Scott González

Owner: set to sarah
Status: newpending

We'll definitely need a reduced test case showing the problem before we make any changes to this.

comment:2 in reply to:  1 Changed 7 years ago by sarah

Status: pendingnew

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 7 years ago by Jörn Zaefferer

Status: newpending

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 7 years ago by sarah

Status: pendingnew

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 7 years ago by Scott González

Resolution: notabug
Status: newclosed
Note: See TracTickets for help on using tickets.