Bug Tracker

Ticket #1409 (closed bug: wontfix)

Opened 1 year ago

Last modified 6 months ago

Interface Slider support for jQuery 1.1.3

Reported by: squinn Assigned to: stefan
Type: bug Priority: major
Milestone: 1.1.4 Component: interface
Version: 1.1.3 Keywords:
Cc: Needs: Review

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

Change History

Changed 1 year ago by squinn

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

Changed 1 year ago by john

  • owner changed from john to stefan
  • component changed from ajax to interface

Changed 1 year 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"

Changed 1 year 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); }

Changed 1 year 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...

Changed 1 year ago by jesse

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

Changed 1 year 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

Changed 1 year ago by anthony

Sorry forgot to mention that the above functions with 1.1.4

Changed 1 year 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

Changed 6 months ago by scott.gonzalez

  • status changed from new to closed
  • resolution set to wontfix

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

Note: See TracTickets for help on using tickets.