Paragraphs Edit problems: z-index and JS Cannot read properties error

Created on 6 October 2023, about 1 year ago
Updated 7 December 2023, about 1 year ago

Problem/Motivation

Two related things are happening. When editing a paragraph inside of an EB modal, the gray overlay will appear ON TOP of all other elements, preventing the user from using the site. The z-index appears to be over 1200, when it should be something like 99 (the EB itself is z-index 100). This only happens the _first_ time AJAX paragraph editing is used inside the modal. Subsequent times is fine.

  • This only happens in an EB modal.
  • It does not happen when going to /admin/content/paragraphs/15/edit.
  • It only seems to happen when an overlay is involved.

When this happens, we also get the following error in the console when/if the screen is resized (which happens when opening inspector):

dialog.position.js?v=10.1.4:82 Uncaught TypeError: Cannot read properties of undefined (reading 'settings')
    at resetSize (dialog.position.js?v=10.1.4:82:32)
    at later (debounce.js?v=10.1.4:37:23)

This error appears every time the window is resized while the overlay/EB is active (every movement generates more errors).

Steps to reproduce

  1. Enable Paragraphs + Paragraphs Library sub-module.
  2. Create "custom_text" paragraph type with simple text field. Allow promoting to library.
  3. Create "container" paragraph type. Add ERR paragraphs reference field to it, allowing "custom_text" paragraph type to be added.
  4. Create View + EB for paragraph library item entities. Requires IEF sub module. Settings: Modal, fluid (no width or height set).
  5. Node with ERR field (paragraphs reference field). Allow "container" paragraph type to be added.
  6. Set form display for From Library paragraph bundle to use EB: Paragraph Library setup in step 3. Settings: Append, Rendered entity, Summary view mode. Display Edit button. Show widget details as open by default.
  7. Create Node -> Paragraphs -> Container -> Custom Text. Save.
  8. Edit this node, promote the Custom Text nested paragraph to the Library (3 dots menu). Save node.
  9. Edit this node: Click edit on From Library item in Node paragraphs field. Click "Edit" button in EB. Click "Edit" in Library paragraphs field.
  10. UI is inaccessible behind gray overlay.
  11. Hit Escape key. Attempt to edit as in step 8 again, without refreshing the page/node edit form.
  12. UI is perfectly fine the second time around.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.9

Component

Field widget

Created by

πŸ‡ΊπŸ‡ΈUnited States amaisano Boston

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

Comments & Activities

Production build 0.71.5 2024