[Webkit-unassigned] [Bug 15256] Impossible to place an editable selection inside empty elements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 6 09:01:57 PST 2010


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


Bruno Windels <bruno.windels at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bruno.windels at gmail.com




--- Comment #26 from Bruno Windels <bruno.windels at gmail.com>  2010-12-06 09:01:56 PST ---
I found a workaround, don't know if anybody found this before but instead of programmatically appending a zero-width space, you can do the same thing with the css3 content property in the after psuedo-selector of the elements you want to put the caret in. This has the advantage that the extra characters don't show up in the DOM and the user can't navigate the caret between it. So basically it doesn't need cleaning up.

For this to work for any child element of your content editable element it would be something like this:

    #mycontenteditableelement *:after {
        content: '\200B';
    }

I didn't check completely, but I suspect this is a full workaround.

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