[Webkit-unassigned] [Bug 23189] Impossible to place caret at the start of a text node

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 27 10:54:59 PDT 2012


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





--- Comment #4 from Tim Down <timdown at gmail.com>  2012-06-27 10:54:58 PST ---
(In reply to comment #3)
> I would love a resolution to this bug as well.  We are currently trying to improve the functionality of some non-editable content in a design mode area.  The first problem is if the non-editable content is the first or last element in the design mode element, it's not technically possible to get the cursor outside of the non-editable node without some DOM Range wizardry.
> 
> The second problem is that when you do have an element directly following the non-editable region, there is no way to put the cursor at the beginning of the following node -- it always falls back to the end of the non-editable node.  Similar DOM Range wizardry can magically place the cursor in the right place EXCEPT when that node is a text node and you are in a WebKit browser.
> 
> Someone please let me know a decent way to work around this and I will be much relieved.

It's far from decent, but you may be able to use the fact that WebKit has a special case for <a> elements and allows the caret to be placed at the start inside an <a> element. Otherwise, you could place a zero-width characters at the start of any text node in which you want to place the caret. This is also obviously deeply non-decent.

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