Bug Tracker

Modify

Ticket #2024 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

Selecting all sliders with ':slider' doesn't work

Reported by: mistermuckle Owned by:
Priority: minor Milestone: 1.2.2
Component: ui Version: 1.2.1
Keywords: slider Cc:
Blocking: Blocked by:

Description

Lines 55-56 of ui.slider.js say:

//Make nodes selectable by expression
$.extend($.expr[':'], { slider: "(' '+a.className+' ').indexOf(' ui-slider ')" });

indexOf() returns -1 on failure, which evaluates to true, and the result is that $(':slider') selects every element on the page. Adding >=0 fixes the problem:

//Make nodes selectable by expression
$.extend($.expr[':'], { slider: "(' '+a.className+' ').indexOf(' ui-slider ')>=0" });

Change History

comment:1 Changed 5 years ago by rworth

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in [4086].

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.