[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
Mon Oct 17 07:30:46 PDT 2011


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





--- Comment #9 from Felipe Heidrich <felipe_heidrich at yahoo.com>  2011-10-17 07:30:46 PST ---
(In reply to comment #8)
> 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.
> 

Yes, but I'm not starting selection in the middle of "aaa" or "bbb".
I start with a mouse down on the div element.
The behaviour is different based on the letter (of "sample text that should not get selected ") that I click. It is a bug.

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

I tried -webkit-user-select:none;
It doesn't work for me, see my initial comment:

// -webkit-user-select:none;    //WORKS BUT window.getSelection().addRange() also stops working

as for getSelection().setPosition(), could you please explain how I could use that to solve my problem?

I have a contentEditable div.
I want to take control over all text selection (keyboard and mouse), stop the UA and implement my own handlers.
I need to set the DOM selection myself.
I need mouse capture to start in mouse down, as I need to implement drag selection and auto scrolling.

-- 
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