Skip to main content

Bug Tracker

Side navigation

#1409 closed bug (wontfix)

Opened July 19, 2007 06:05PM UTC

Closed March 31, 2008 01:46AM UTC

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?

Attachments (0)
Change History (10)

Changed July 19, 2007 06:06PM UTC by squinn comment:1

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

Changed July 20, 2007 12:49AM UTC by john comment:2

component: ajaxinterface
owner: johnstefan

Changed July 25, 2007 06:08PM UTC by jamesjoh comment:3

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"

Changed July 30, 2007 05:01AM UTC by djdula comment:4

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); }

Changed August 09, 2007 12:43PM UTC by jesse comment:5

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...

Changed August 09, 2007 01:11PM UTC by jesse comment:6

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

Changed August 29, 2007 03:53PM UTC by anthony comment:7

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

Changed August 29, 2007 03:57PM UTC by anthony comment:8

Sorry forgot to mention that the above functions with 1.1.4

Changed October 05, 2007 09:42PM UTC by dietrich comment:9

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

Changed March 31, 2008 01:46AM UTC by scott.gonzal comment:10

resolution: → wontfix
status: newclosed

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