Bug Tracker

Opened 16 years ago

Closed 16 years ago

#1409 closed bug (wontfix)

Interface Slider support for jQuery 1.1.3

Reported by: squinn Owned by: stefan
Priority: major Milestone: 1.1.4
Component: interface Version: 1.1.3
Keywords: Cc:
Blocked by: Blocking:

Description

We're using the "Slider" mechanism from the interface plugin in our application which works fine with jQuery 1.1.2, but throws an error with jQuery 1.1.3 in Internet Explorer (at least in IE7). Are there any plans to update interface to support jQuery 1.1.3?

Change History (10)

comment:1 Changed 16 years ago by squinn

Sorry, I forgot to select the right component. This should be switched to the "interface" component.

comment:2 Changed 16 years ago by john

Component: ajaxinterface
Owner: changed from john to stefan

comment:3 Changed 16 years ago by jamesjoh

I see the same behavior. Opening up the script debugger in IE shows the problem in jquery.js in method 'find':

return this.pushStack( /[+>] [+>]/.test( t )
t.indexOf("..") > -1 ? jQuery.unique( data ) : data );

I'm not sure which part of that line is causing the problem but the error in IE simply says:

"Object doesn't support this property or method"

comment:4 Changed 16 years ago by djdula

This is how I fixed it:

in interface's idrag.js remove the line

var dhe = o.handle ? jQuery(this).find(o.handle) : jQuery(this);

and replace it with

if (jQuery.browser.msie) { var dhe=$(o.handle); }

else { var dhe = o.handle ? jQuery(this).find(o.handle) : jQuery(this); }

comment:5 Changed 16 years ago by jesse

I'm thinking this is a jQuery issue, not an Interface issue.

The problem, it seems, relates to this:

/[+>] [+>]/.test( t )

when t is a DOM Element, this evaluates to true in Firefox, but false in IE. So only in IE does it evaluate t.indexOf which is the method that is not supported.

Will continue to explore...

comment:6 Changed 16 years ago by jesse

Nevermind, .find() should only have a string as the parameter. o.handle should be a string, not an element.

comment:7 Changed 16 years ago by anthony

I noticed that the solution above works for single handle sliders but not for double handles so I rewrote the function:

  find: function(t) {
    var data = jQuery.map(this, function(a){ return jQuery.find(t,a); });
    if(jQuery.browser.msie){
      return this.pushStack( jQuery.map( this, function(a){
        return jQuery.find(t,a);
      }), t );
    }else{
      return this.pushStack( /[^+>] [^+>]/.test( t ) || t.indexOf("..") > -1 ?
	jQuery.unique( data ) : data );
    }
},

I added an if-statement to check if the browser is IE, and if it is, it implements the code from the find: function in jQuery 1.1.2. This solution isn't fully tested, so please give feedback if it works or not.

Thanks

comment:8 Changed 16 years ago by anthony

Sorry forgot to mention that the above functions with 1.1.4

comment:9 Changed 16 years ago by dietrich

I replace the find function with the above code and it stopped IE 7 from crashing, but once I move the right handle and then switch to the left, the control wont let me use the right handle again.

Using jquery.js-1.2.1 and interface.js 1.2.

Thanks

comment:10 Changed 16 years ago by scott.gonzal

Resolution: wontfix
Status: newclosed

Interface is no longer supported; consider switching to jQuery UI.

Note: See TracTickets for help on using tickets.