Search and Top Navigation
#8912 closed bug (cantfix)
Opened December 14, 2012 06:48PM UTC
Closed December 19, 2012 06:14PM UTC
Last modified March 21, 2014 01:40AM UTC
Slider: stop event is not triggered if mouse moved out of iframe
Reported by: | gary.yip.jquery | Owned by: | gary.yip.jquery |
---|---|---|---|
Priority: | minor | Milestone: | 1.10.0 |
Component: | ui.slider | Version: | 1.8.23 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
To reproduce:
1) Set a vertical slider in a page which is not 100% of the height of the page.
2) Click and hold the left button of the mouse on the slider's slide.
3) Still holding the mouse button down and move the slider up to a point where the mouse cursor is not inside the slider.
4) Release the mouse button.
Expected:
Slider's stop event is triggered.
Observed:
Slider's stop event is not triggered.
Attachments (0)
Change History (9)
Changed December 15, 2012 02:47AM UTC by comment:1
owner: | → gary.yip.jquery |
---|---|
status: | new → pending |
Changed December 15, 2012 11:07PM UTC by comment:2
status: | pending → new |
---|
Replying to [comment:1 tj.vantoll]:
Hi gary.yip.jquery, I'm not seeing the issue you are describing - http://jsfiddle.net/tj_vantoll/HjQH2/. Can you please provide additional information on how this can be recreated? What browser / OS are you using? Thanks.
Hi tj.vantoll,
I used chrome, opened your link. Drag the slider all the way up, then move the mouse to the "body" area. See the following image: [[Image(http://i46.tinypic.com/2itr6tv.png)]] Now, let go the mouse and if mouse is back to the slider area, the slider will follow the mouse movement without you even clicking the mouse.
Regards,
Gary
Changed December 16, 2012 07:51PM UTC by comment:3
status: | new → open |
---|---|
summary: | Slider's stop event is not triggered if mouse moved out of the slider range → Slider: stop event is not triggered if mouse moved out of the slider range |
Ok, I see what you're saying now. I believe the problem is that a mouseup event is not going to be fired when the mouse is not over the window itself. Dojo's slider suffers from the same issue - http://dojotoolkit.org/reference-guide/1.8/dijit/form/VerticalSlider.html#dijit-form-verticalslider.
I'll mark this one as valid for now because YUI's slider does not seem to suffer from this issue - http://yuilibrary.com/yui/docs/slider/slider-basic.html. Curious what others think about this one.
Changed December 16, 2012 11:21PM UTC by comment:4
I was using iFrame in my page and a slider in the iFrame page (the inner page). I saw this behavior when I slide from the inner page to the outer page.
Changed December 17, 2012 03:23AM UTC by comment:5
summary: | Slider: stop event is not triggered if mouse moved out of the slider range → Slider: stop event is not triggered if mouse moved out of iframe |
---|
I see. This is only a problem if the slider is in an iframe because it does not occur here http://jsfiddle.net/tj_vantoll/HjQH2/show/.
Changed December 19, 2012 06:14PM UTC by comment:6
resolution: | → cantfix |
---|---|
status: | open → closed |
Unfortunately there's nothing we can do about this. Browsers don't expose any way to know what has happened after the mouse leaves the window.
Changed March 21, 2014 12:54AM UTC by comment:8
But you *can* know when the mouse leaves the window (mouseout), right? So maybe the slider should assume mouseout is a "stop" event, the same as it would mouseup.
Doing so might require someone to start the drag over again if they accidentally leave the container, but that is preferable (and arguably more natural) than having the slider handle suddenly become a mouse-tracking zombie ("Brains... Mouse brains.") once the mouse reenters the container.
Please consider reopening this ticket, and use mouseout events the same as mouseup. (Maybe that's what YUI's slider is doing, since it works properly per 'gary.yip.jquery'.)
Changed March 21, 2014 01:40AM UTC by comment:9
But you *can* know when the mouse leaves the window (mouseout), right?
Not quite. Perhaps some complex checking would make this possible (listening for multiple events within a time period after a mouseout on the window), but that seems a bit excessive. Feel free to put together a pull request that does this, but we'll need extensive testing to prove that whatever solution you use doesn't have false positives.
Hi gary.yip.jquery, I'm not seeing the issue you are describing - http://jsfiddle.net/tj_vantoll/HjQH2/. Can you please provide additional information on how this can be recreated? What browser / OS are you using?
Thanks.