[Webkit-unassigned] [Bug 66948] REGRESSION (Safari 5.1 - ToT): Preventing user selection using "selectstart" not working

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 30 12:35:07 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=66948





--- Comment #8 from Ryosuke Niwa <rniwa at webkit.org>  2011-09-30 12:35:07 PST ---
(In reply to comment #7)
> After trying several times I managed to cause the bug in IE, I need to place the caret after the offset at line end, or before the offset at line start. Then move the mouse the opposite direction.
> 
> Nothing but a bug in IE.

This isn't a bug. selectstart event fires in the element where mousedown occurred. If you start selection in the middle of "aaa" and extend it to the middle of "bbb", you can always select the text in the box.

> Nevertheless, I don't have the bug in IE for my project. There, I could stop the mouse down event to prevent text selection, then use element.setCapture() to receive all the mouse events to implement my own text selection behavior.
> 
> In Webkit, I could stop the mouse down the same way (stopping native text selection). But then I lose the capture, and there is no setCapture() API in webkit...

Try -webkit-user-select:none; and getSelection().setPosition.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list