Event#observe no longer supports "useCapture" param should be documented
Reported by John-David Dalton | April 24th, 2008 @ 05:47 PM | in Inline documentation
see title.
Comments and changes to this ticket
-
John-David Dalton April 24th, 2008 @ 05:47 PM
- → State changed from new to doc
-
John-David Dalton May 29th, 2008 @ 04:36 AM
- → Assigned user changed from to Tobie Langel
-
Jakob Kruse October 16th, 2008 @ 07:04 PM
- → Tag changed from to needs_docs
I spent several hours figuring out why useCapture = true didn't work today. Can somebody please insert a comment in the docs? Or tell me what to do and I'll happily do it myself :)
On a related note, removing support for capture phase event handlers is a really (really!) bad idea. They are currently the only reasonable way to handle focus/blur in something like a keyboard driven menu system.
-
Andrew Dupont October 16th, 2008 @ 10:22 PM
- → State changed from doc to resolved
Fixed this in the docs.
We removed capture phase support because we can't guarantee it across browsers. If you need to use the capture phase in compliant browsers, you'll have to fork your code anyway, so our abstractions wouldn't be of much help anyway.
-
Jakob Kruse October 17th, 2008 @ 09:15 AM
Thank you for the doc update!
Actually, it would be helpful. I wouldn't need to fork my code if I could do:
Event.observe('mydiv', 'focusout', myblurhandler); Event.observe('mydiv', 'blur', myblurhandler, true);
In fact, those two together is how you (would) guarantee delegated blur events across current browsers. The removal of useCapture from Prototype means now only the non-standard of those two (the focusout event) is supported. Seems odd...
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
The Prototype JavaScript library.
