ケース ce-0065 · シナリオ scenario-readonly-attribute

readonly attribute does not prevent editing in contenteditable

OS: Linux Ubuntu 22.04 デバイス: Desktop or Laptop Any ブラウザ: Firefox 120.0 キーボード: US 下書き
readonlyeditingfirefox

このページはまだ翻訳されていません

現在、英語の原文を表示しています。翻訳への貢献をお待ちしております。

Phenomenon

The readonly attribute, which should prevent editing on form inputs, does not work on contenteditable regions in Firefox. Users can still edit the content even when readonly is set.

Reproduction example

  1. Create a contenteditable div with readonly attribute.
  2. Try to edit the content.
  3. Observe whether editing is prevented.

Observed behavior

  • In Firefox on Linux, the readonly attribute does not prevent editing.
  • Users can still modify content.
  • The attribute is ignored.

Expected behavior

  • The readonly attribute should prevent editing on contenteditable.
  • Content should be view-only when readonly is set.
  • Behavior should match standard input elements.

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: Linux Ubuntu 22.04
Device: Desktop or Laptop Any
Browser: Firefox 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.