์ผ€์ด์Šค ce-0040 ยท ์‹œ๋‚˜๋ฆฌ์˜ค scenario-contenteditable-readonly

contenteditable="false" on child elements is not respected consistently

OS: Any Ubuntu 22.04 ๊ธฐ๊ธฐ: Desktop or Laptop Any ๋ธŒ๋ผ์šฐ์ €: Chrome 120.0 ํ‚ค๋ณด๋“œ: US ์ดˆ์•ˆ
readonlynestedcontenteditablechrome

์ด ํŽ˜์ด์ง€๋Š” ์•„์ง ๋ฒˆ์—ญ๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค

ํ˜„์žฌ ์˜์–ด ์›๋ฌธ์„ ํ‘œ์‹œํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋ฒˆ์—ญ์— ๊ธฐ์—ฌํ•ด ์ฃผ์‹œ๋ฉด ๊ฐ์‚ฌํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

Phenomenon

When a contenteditable region contains child elements with contenteditable="false", the behavior is inconsistent. Some browsers allow editing within these elements, while others correctly prevent it.

Reproduction example

  1. Create a contenteditable div.
  2. Inside it, add a child element with contenteditable="false":
    <div contenteditable="true">
      <p>Editable text</p>
      <p contenteditable="false">This should not be editable</p>
    </div>
  3. Try to edit the text in the child element with contenteditable="false".
  4. Observe whether editing is prevented.

Observed behavior

  • In Chrome, child elements with contenteditable="false" may still be editable.
  • The attribute is not consistently respected.
  • Selection and editing may work within elements that should be read-only.

Expected behavior

  • Elements with contenteditable="false" should not be editable.
  • The attribute should be respected regardless of parent element state.
  • Selection within read-only elements should be allowed, but editing should be prevented.

Playground for this case

Use the reported environment as a reference and record what happens in your environment while interacting with the editable area.

Reported environment
OS: Any Ubuntu 22.04
Device: Desktop or Laptop Any
Browser: Chrome 120.0
Keyboard: US
Your environment

Use this editable area to reproduce the described case.

Event log
Use this log together with the case description when filing or updating an issue.
0 events
Interact with the editable area to see events here.