Opened 9 years ago

Closed 8 years ago

#14852 closed defect (fixed)

[patch] Issue with HorizontalRangeSlider within a BorderContainer with a leading region

Reported by: jeetesh_n Owned by: Douglas Hays
Priority: undecided Milestone: 1.7.3
Component: DojoX Form Version: 1.7.1
Keywords: Cc: Douglas Hays
Blocked By: Blocking:

Description (last modified by bill)

I've a HorizontalRangeSlider widget within the bottom region of a BorderContainer. I can select the right & left handle of the slider and vary the range. However if i click between the handles i.e. on the bar and move it, the bar doesn't follow the mouse cursor position.

My BorderContainer has a leading region. If i hide this leading region then the Horizontal slider bar moves along the mouse cursor. It seems that the pixel co-ordinates that are calculated within the RangeSlider? are not relative to a region of the bordercontainer.

This was working fine in Dojo 1.6.

I've attached a test example. I've modified the existing /dijit/tests/layout/test_BorderContainer_full.html to reproduce this issue.

Thanks, Jeetesh

Attachments (3)

test_BorderContainer_slider.html (3.4 KB) - added by jeetesh_n 9 years ago.
test_BorderContainer_slider.2.html (3.5 KB) - added by jeetesh_n 9 years ago.
Slider default value set to [40,60]
#14852.diff (1019 bytes) - added by jeetesh_n 8 years ago.
patch to solve this issue

Download all attachments as: .zip

Change History (16)

Changed 9 years ago by jeetesh_n

comment:1 Changed 9 years ago by bill

Cc: Douglas Hays added
Description: modified (diff)
Owner: changed from dante to jeetesh_n
Status: newpending

I can't get clicking between the handles to do anything, not even against 1.6, not even if I hide the leading region before creating the RangeSlider. At least not on FF11/mac.

Changed 9 years ago by jeetesh_n

Slider default value set to [40,60]

comment:2 Changed 9 years ago by jeetesh_n

Status: pendingnew

Attachment (test_BorderContainer_slider.2.html) added by ticket reporter.

Version 0, edited 9 years ago by jeetesh_n (next)

comment:3 Changed 9 years ago by bill

What do you mean by "moving the bar"?

comment:4 Changed 9 years ago by jeetesh_n

Well i meant moving the horizontal slider.

Click the area between the two handle (i called it 'bar', sorry, i don't know whats the right term) and while its clicked move the mouse. The slider then moves horizontally.

comment:5 Changed 9 years ago by bill

I'm still confused. If you mouse-down at 45, then mouse-move to 55, and then mouse-up, what is supposed to happen? The slider range gets reset to 45-55?

And when you say "The slider then moves horizontally", are you talking about the slider handles moving? Or the whole slider?

comment:6 Changed 9 years ago by jeetesh_n

In this example, default position is [40,60]. 1) Mouse down at 45 2) Mouse move to 50 3) The whole slider moved to [70,90]. My mouse is still down, this is the issue i'm seeing.

comment:7 Changed 9 years ago by bill

Ah I see, thanks. So by dragging the blue bar between the two handles, you are moving both handles equally, plus the bar between them.

The SliderBarMover code in RangeSlider.js is very strange; looks like it should all be rewritten, to compare e.pageX at the start of the drag and on mouse move, to get a delta to move the sliders. There shouldn't be any calls to domGeometry.position(), except maybe to get the width of the bar.

comment:8 Changed 9 years ago by jeetesh_n

Is any more inputs required from me. Is it possible to assign this bug to the original author of this component. Thanks.

comment:9 Changed 9 years ago by Douglas Hays

Status: newopen

Changed 8 years ago by jeetesh_n

Attachment: #14852.diff added

patch to solve this issue

comment:10 Changed 8 years ago by jeetesh_n

Dojo 1.7 replaced dojo.coords with domGeometry.position. The later returns absolute values and hence removed the extra subtraction of abspos[widget._startingPixelCoord]

comment:11 Changed 8 years ago by bill

Owner: changed from jeetesh_n to Douglas Hays
Status: openassigned
Summary: Issue with HorizontalRangeSlider within a BorderContainer with a leading region[patch] Issue with HorizontalRangeSlider within a BorderContainer with a leading region

Probably also fixes #15493. Not sure if jeetesh_n has a CLA but the patch is trivial (just one line).

comment:12 Changed 8 years ago by Douglas Hays

Milestone: tbd1.7.3

comment:13 Changed 8 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

In [28775]:

Fixes #15493, #14852. Correct touch/mouse press location.

Note: See TracTickets for help on using tickets.