Closed Bug 486931 Opened 17 years ago Closed 15 years ago

contentEditable doesn't work for app/xhtml+xml or text/xml

Categories

(Core :: DOM: Editor, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jharrop, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.4) Gecko/2008111318 Ubuntu/8.04 (hardy) Firefox/3.0.4 Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.4) Gecko/2008111318 Ubuntu/8.04 (hardy) Firefox/3.0.4 @content-editable="true" makes the relevant element editable provided the content type is text/html But it doesn't work for content types app/xhtml+xml or text/xml One ramification of this is that i can't use namespaces in my css (since those don't seem to work for text/html content type) It would be good if contentEditable worked for at least content type app/xhtml+xml. I know that attribute isn't part of xhtml (though one can add it via XHTML Modularization 1.1), but it isn't part of HTML 4 either. Reproducible: Always
This is a mass search for bugs which are in the Firefox General component, are UNCO, have not been changed for 500 days and have an unspecified version. Reporter, can you please update to Firefox 3.6.10 or later, create a fresh profile, http://support.mozilla.com/en-US/kb/managing+profiles, and test again. If you still see the issue, please update this bug. If the issue is gone, please set the status to RESOLVED > WORKSFORME.
Whiteboard: [CLOSEME 2010-11-01]
Whiteboard: [CLOSEME 2010-11-01]
Copying the description from the duplicated bug 662034: -------------------------------------------------- So, the issue is still present in the latest Firefox (Ubuntu). I have nothing to add to the description given in #486931. Reproducible: Always Steps to Reproduce: 1. Go to http://html5demos.com/contenteditable; 2. Got to the end of the list in the sample contenteditable element and press <End> 3. Press <Return> twice in a raw; 4. type in some more lines ended by <Return> Inspect the markup generated after the ordered list. Actual Results: The new text lines are positioned in DOM immediately in the contenteditable element and are text nodes separated with <br/>s. Expected Results: The new lines of text added after the list should be <p> elements.
Version: unspecified → 4.0 Branch
Component: General → Editor
Product: Firefox → Core
QA Contact: general → editor
Version: 4.0 Branch → unspecified
Bug 662034 has nothing to do with this bug.
Confirmed, simply changing the extension from 'xhtml' to 'html' makes this work fine in Firefox 4.
I have been experimenting with a rich text editor for my site which is XHTML 1.1 and served as application/xhtml+xml to browsers that declare XHTML support and I am able to give focus to the editable divisible element however it's not exactly something I can easily create a standalone test case. This may in some way be related to the XHTML tabindex bug that I filed in 2007 (https://bugzilla.mozilla.org/show_bug.cgi?id=383349) though I'm not entirely sure. If someone is serious about fixing this bug I'll work to create a standalone test case and work to minimize the code as much as possible to root out the difference between the attachment I uploaded and my site's experimental editor.
Comment 3 is private: false
Attachment #538030 - Attachment mime type: application/octet-stream → application/xhtml+xml
Supporting contenteditable in XHTML documents is a very big project, and I'm not sure if this is something that we're interested in providing support for, since the web is moving towards HTML5, and XHTML is not interoperable in practice.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Exactly how is supporting contenteditable in XHTML a "very big project"? Not everyone is interested in HTML5 and in addition to that by not supporting XHTML Firefox will ALSO not support XHTML5. HTML has nothing except disadvantages in comparison to XHTML. Most importantly you've stated you won't fix the bug without even allowing others to determine what is causing the bug which is completely unacceptable.
John A. Bilicki III said that “simply changing the extension from 'xhtml' to 'html' makes this work fine in Firefox 4.”. However, I can't tell how would that relate to http://html5demos.com/contenteditable example, where there is only DOCTYPE definition and no file extension, and how to make contenteditable work correctly in such a context.
A small oversight, the contenteditable had an uppercase 'E' in the attachment, making the attribute completely lowercase resolved the issue. Jason Harrop, you initially filed this bug, could you please clarify (since it looks like you were using JavaScript to generate an editable element) that your attribute is completely lowercase?
Our current HTML editor doesn't support XHTML, in the sense that the DOM that it provides after editing operations is not guaranteed to confirm to XHTML requirements. The code base involved is very large, and making sure that the generated DOM is XHTML-conformant is not trivial. As far as I know, Mozilla doesn't have any plans to support XHTML5. Of course, we don't actively disable the usage of contenteditable in XHTML documents, but authors who use them should be aware that the document resulting from the editing operations is not guaranteed to be valid XHTML any more.
(In reply to comment #10) > A small oversight, the contenteditable had an uppercase 'E' in the > attachment, making the attribute completely lowercase resolved the issue. Yes, in XHTML, attributes are case sensitive, so we don't recognize contentEditable to mean anything special.
This bug was closed for the reason that the world is moving to HTML5 but in fact it also affects spec conformant HTML5 when transmitted as application/xhtml+xml (which is legal syntax for HTML5).
This bug is still present in FF48.0. For reference, Chrome/Chromium perfectly supports contenteditable=true in XML/XHTML documents.
XHTML5 (HTML5 using the XML parser) is valid. It's NOT a large project as there are arrays somewhere in the code that check what mime is allowed for rich editing to trigger. In essence the people who refuse to fix this have a clear grudge against XHTML instead of actually bothering to fix the issue which (as a full platform web developer) should be an extremely easy fix if someone in the know got off their high-throne.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: