It'd be useful for a JavaScript framework I'm developing if WebKit would implement the IE-specific setCapture/releaseCapture functions and the "losecapture" event. These functions basically route all subsequent mouse events to an object until capture is lost. It is a fairly standard part of an OS UI toolkit, I believe the IE implementation is intended to clone the Windows API SetCapture/ReleaseCapture methods. Gtk has a similar concept called "grab". See http://msdn.microsoft.com/en-us/library/ms536742(VS.85).aspx for more information. Forgive me if this has already been discussed, I couldn't find anything in the bug system.
I agree with Ben that this is really useful. Getting dragging to behave sane in the presence of iframes, windowed plugins and handling mouse releases outside the window is something 9 out of 10 web apps fail to do correctly today. It also simplifies the event handling code a js author needs to write since they only have to listen to the initial target.
Relevant public-webapps thread: http://www.mail-archive.com/public-webapps@w3.org/msg01512.html Ben, Erik, what do you think about Hixie's comment: "Note that I don't think we'd need releaseCapture(); we should just say that capture is canceled when the mouse is released if it was captured. This gets around the problem of unbalanced set/release."
(In reply to comment #2) > Relevant public-webapps thread: > http://www.mail-archive.com/public-webapps@w3.org/msg01512.html > > Ben, Erik, what do you think about Hixie's comment: > "Note that I don't think we'd need releaseCapture(); we should just say > that capture is canceled when the mouse is released if it was captured. > This gets around the problem of unbalanced set/release." I think Hixie has a point but I don't think we should diverge from IE's API. It is just not worth it
Firefox just added this.
Any movement on this? ETA?
Any movement on this?
ANY plans here?
hi, any news?