#8912 closed bug (cantfix)
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.
Change History (9)
comment:1 follow-up: 2 Changed 10 years ago by
Owner: | set to gary.yip.jquery |
---|---|
Status: | new → pending |
comment:2 Changed 10 years ago by
Status: | pending → new |
---|
Replying to 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: 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
comment:3 follow-up: 4 Changed 10 years ago by
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.
comment:4 Changed 10 years ago by
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.
comment:5 Changed 10 years ago by
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/.
comment:6 Changed 10 years ago by
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.
comment:8 Changed 9 years ago by
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'.)
comment:9 Changed 9 years ago by
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.