Ticket #4106 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

JS error when slider is on minimum and mouse up is not on handle

Reported by: ntoniazzi Owned by:
Priority: blocker Milestone: 1.7
Component: ui.slider Version: 1.6rc6
Keywords: Cc:
Blocking: Blocked by:

Description

Slider options:

  • min unset or 0
  • range set ("min" or "max")

Test:

  • move handle to minimum but don't release the mouse button
  • move mouse pointer outside the handle
  • release mouse button
  • click again on slider

Results: javascript error in jquery (jQuery.fn.offset)

Version:

  • jquery 1.3.1
  • jquery.ui 1.6rc6

Code:

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Slider Demo</title>
    <link type="text/css" href="theme/ui.all.css" rel="Stylesheet" />	
    <script type="text/javascript" src="jquery-1.3.1.js"></script>
    <script type="text/javascript" src="ui.core.js"></script>
    <script type="text/javascript" src="ui.slider.js"></script>
    <style type="text/css">
      body{ font: 62.5% Verdana, sans-serif; margin: 50px;}
      /*demo page css*/
    </style>	
  </head>
  <body>
    <div id="slider" style="width: 200px;"></div>
    <script type="text/javascript">
      jQuery("#slider").slider({
        range: "max",
        value: 10,
        min: 0
      });
    </script>
  </body>
</html>

Change History

comment:1 Changed 5 years ago by ntoniazzi

Line 202 in ui.core.js Change

if(o.range && (this.values(0) + this.values(1)) == 0) {

with

if(o.range==true && (this.values(0) + this.values(1)) == 0) {

comment:2 Changed 5 years ago by paul

  • Priority changed from major to critical

comment:3 Changed 5 years ago by rdworth

  • Priority changed from critical to blocker

comment:4 Changed 5 years ago by scott.gonzalez

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

Fixed in r1953.

Note: See TracTickets for help on using tickets.