Off Canvas reset breaks contenteditable functionality in several browsers

Created on 30 March 2021, about 3 years ago
Updated 28 March 2024, 3 months ago

Problem/Motivation

Discovered in #3201820: Manually test that CKE 5 can be used in off-canvas β†’

In core/misc/dialog/off-canvas.reset.css, there is a style that sets most elements within the dialog to all: initial;. This overrides the user-modify property, and makes the element (and its children) non-editable.

I created a codepen to demonstrate example of how all: initial; breaks contenteditable (and how to potentially fix it) https://codepen.io/bbbenjamin/pen/poRNJwM

Steps to reproduce

In Chrome or Firefox: (other browsers may be impacted, but these are confirmed)
Use inspector to add a contenteditable div in the main canvas. It will be editable
Use inspector to add a contenteditable div inside an off-canvas dialog. It won't be editable.

Proposed resolution

The solution would need to target any contenteditable elements AND its child elements. Adding a rule to do this in off-canvas.reset.pcss.css shouldn't be too complicated, but it would be nice to find a solution that doesn't balloon the filesize of the off-canvas.reset.css file it compiles to.

Something like this should work

#drupal-off-canvas [contenteditable],
#drupal-off-canvas [contenteditable] * {
  -webkit-user-modify: read-write;
  -moz-user-modify: read-write;
}

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Closed: outdated

Version

11.0 πŸ”₯

Component
CSSΒ  β†’

Last updated 4 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Status changed to Closed: outdated 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Since there hasn't been a follow up to #10 going to close for now. If still not fixed in D10 please reopen.

Production build 0.69.0 2024