W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

[Bug 14578] New: Figure out how to behave if editing host is an inline element

From: <bugzilla@jessica.w3.org>
Date: Thu, 27 Oct 2011 21:00:24 +0000
To: public-webapps@w3.org
Message-ID: <bug-14578-2927@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=14578

           Summary: Figure out how to behave if editing host is an inline
                    element
           Product: WebAppsWG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML Editing APIs
        AssignedTo: ayg@aryeh.name
        ReportedBy: ayg@aryeh.name
         QAContact: sideshowbarker+html-editing-api@gmail.com
                CC: mike@w3.org, public-webapps@w3.org


Currently I generally just don't test this case.  Example: what happens if you
run insertOrderedList on <span contenteditable>foo[]</span>?

IE9: <span contentEditable=""><p>foo</p></span>
Firefox 9.0a2: Throws NS_ERROR_FAILURE
Chrome 16 dev: <span contenteditable=""><ol><li>foo<br></li></ol></span>
Opera 11.50: Throws NOT_FOUND_ERR

How about <div contenteditable><span contenteditable>foo[]</span></div>?

IE9: <div contentEditable=""><span contentEditable=""><p>foo</p></span></div>
Firefox 9.0a2: <div contenteditable=""><ol><li><span
contenteditable="">foo</span></li></ol></div>
Chrome 16 dev: <div contenteditable=""><ol><li>foo<br></li></ol></div>
Opera 11.50: <div contenteditable=""><ol><li><span
contenteditable="">foo</span></li></ol></div>

<span contenteditable><ul><li>foo[]</ul></span>?

IE9: <span contentEditable=""><ol><li>foo</li></ol></span>
Firefox 9.0a2: NS_ERROR_FAILURE
Chrome 16 dev: <span contenteditable=""><ol><li>foo<br></li></ol></span>
Opera 11.50: <span contenteditable=""><ol><li>foo</ol></span>

I see three sensible options:

1) Pretend the editing host isn't inline, and give it block children.

2) Silently refuse to add new block elements if there's no ancestor in the same
editing host that they're allowed children of, but otherwise execute the
commands normally.  E.g., insertOrderedList should refuse to insert lists but
should change existing <ul>s.

3) Bail out of all block-level commands unconditionally if the editing host is
inline.

I'm leaning toward (2).  Opinions?

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Thursday, 27 October 2011 21:00:27 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:48 GMT