Opened 8 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 )
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)
Change History (16)
Changed 8 years ago by
Attachment: | test_BorderContainer_slider.html added |
---|
comment:1 Changed 8 years ago by
Cc: | Douglas Hays added |
---|---|
Description: | modified (diff) |
Owner: | changed from dante to jeetesh_n |
Status: | new → pending |
Changed 8 years ago by
Attachment: | test_BorderContainer_slider.2.html added |
---|
Slider default value set to [40,60]
comment:2 Changed 8 years ago by
Status: | pending → new |
---|
Attachment (test_BorderContainer_slider.2.html) added by ticket reporter.
I tested it on FF10.0 on windows and it works.
I've added a new attachment, only a single line change where i'm giving the slider a default value of [40,60].
If this works, you will notice that while moving the bar (the region between the two handles) the mouse cursor jumps way left to the left-most handle. The bar still moves but the mouse cursor is not between the two handles. If the leading pane of the bordercontainer is hidden, the bar moves and the mouse cursor stays between the two handles.
Let me know if this doesn't work. Thanks.
comment:4 Changed 8 years ago by
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 8 years ago by
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 8 years ago by
comment:7 Changed 8 years ago by
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 8 years ago by
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 8 years ago by
Status: | new → open |
---|
comment:10 Changed 8 years ago by
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
Owner: | changed from jeetesh_n to Douglas Hays |
---|---|
Status: | open → assigned |
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
Milestone: | tbd → 1.7.3 |
---|
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.