WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 27330
setCapture/releaseCapture/onlosecapture
https://bugs.webkit.org/show_bug.cgi?id=27330
Summary
setCapture/releaseCapture/onlosecapture
Ben Goodger
Reported
2009-07-15 22:02:49 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Erik Arvidsson
Comment 1
2009-07-16 09:15:19 PDT
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.
Ojan Vafai
Comment 2
2009-07-16 09:36:46 PDT
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."
Erik Arvidsson
Comment 3
2009-07-16 10:54:51 PDT
(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
Erik Arvidsson
Comment 4
2009-10-20 17:50:30 PDT
Firefox just added this.
Jeremy
Comment 5
2011-10-19 01:48:14 PDT
Any movement on this? ETA?
Bronislav Klucka
Comment 6
2012-03-18 01:29:09 PDT
Any movement on this?
Bronislav Klucka
Comment 7
2012-05-11 02:28:44 PDT
ANY plans here?
Bronislav Klucka
Comment 8
2013-03-04 20:16:37 PST
hi, any news?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug