Caso ce-0065 · Escenario scenario-readonly-attribute

readonly attribute does not prevent editing in contenteditable

SO: Linux Ubuntu 22.04 Dispositivo: Desktop or Laptop Any Navegador: Firefox 120.0 Teclado: US Borrador
readonlyeditingfirefox

Esta página aún no ha sido traducida

Actualmente se muestra el contenido original en inglés. Agradecemos su contribución a la traducción.

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.