Contenteditable attribute doesn't work for <input> and <textarea>
Reported by
leose...@rambler.ru,
Oct 9
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 Example URL: https://jsfiddle.net/04ahu6fn/ Steps to reproduce the problem: 1. Go to https://jsfiddle.net/04ahu6fn/ 2. Try to type something to text input fields What is the expected behavior? Contenteditable attribute should work for all elements. What went wrong? Contenteditable attribute doesn't work for <input> and <textarea> Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? No Does this work in other browsers? No Chrome version: 67.0.3396.87 Channel: stable OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version:
,
Oct 9
While this is something we could consider addressing this is part of a bigger issue which is the general state of contenteditable, or editing support in general, on the web platform. Lots and lots of work to do on that front, but not something that's risen to the top of the priority list at any vendor to date, thus the current state. I'm passing this over to the editing team for further evaluation against their overall priorities, and for the team to decide whether they want to confirm this issue or not, given the under specified nature of editing.
,
Oct 9
Editing team considers adding contenteditable to <input> and <textarea> as incorrect usage. Their interactability should be controled by readonly and disabled attributes. Note: Firefox (60.2.0esr (64-bit)) has the same behavior on the test case. @leoseven: Could you give an example where we must use contenteditable on <input> and <textarea>, while readonly and disabled don't serve the purpose?
,
Oct 11
"contenteditable" enables editing functionality to contents of element. Regarding HTML5 specification, <input> element doesn't take child element in its syntax. Even if JS adds child nodes, they are not rendered. This is also applied to <textarea>, parser treats characters inside <textarea> as sequence of characters instead of markup until </textarea>. <textarea> takes only Text node and they are used for initial value of <textarea>. In other words, form controls, <audio>, <video>, <svg>, <canvas> are not supported as editing functionality now. Possible extension are implementing special editors of them, e.g. drawing editor for <canvas>, video editor for <video>, etc.
,
Oct 20
>Editing team considers adding contenteditable to <input> and <textarea> as incorrect usage. Their interactability should be controled by readonly and disabled attributes. In such case, contentEditable DOM property should always return "false" for readonly inputs. Now it returns "inherit". >Could you give an example where we must use contenteditable on <input> and <textarea>, while readonly and disabled don't serve the purpose? No, I couldn't. It's just an experiment.
,
Oct 20
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 30
Mark WontFix since it works as expected. >#c5, the value of Element#contentEdiable is "inherit" if the element doesn't have "contenteditable" attribute[1]. From the spec: The contentEditable IDL attribute, on getting, * must return the string "true" if the content attribute is set to the true state, * "false" if the content attribute is set to the false state, * and "inherit" otherwise. [1] https://html.spec.whatwg.org/multipage/interaction.html#dom-contenteditable |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by susan.boorgula@chromium.org
, Oct 9