Disable interactive elements in blocks to allow dragging

Created on 29 February 2024, 4 months ago
Updated 15 March 2024, 3 months ago

Problem/Motivation

Currently some blocks are not draggable in the Layout Builder + UI, because they may contain interactive elements link oEmbeds, linked elements, form elements etc. πŸ“Œ Disable block links Fixed already started to solve this, but only does it for links.

Steps to reproduce

  • Create an inline block type with remote video oEmebeds
  • Configure inline block type display to output the oEmbed content
  • Add on of these inline blocks to a layout and try to drag it around - e.g. for YouTube oEmbeds, dragging is not possible, but a click on the block starts the video

Proposed resolution

  • At best reuse core's implementation in layout_builder module's JS, where interactive elements are disabled in inline blocks (see layout_builder/js/layout-builder.js and especially behaviors.layoutBuilderDisableInteractiveElements

Remaining tasks

  • Create an issue fork an MR to solve this issue

User interface changes

  • Blocks with interactive elements will be draggable in Layout Builder + UI

API changes

n/a

Data model changes

n/a

✨ Feature request
Status

Fixed

Version

2.1

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany hctom

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

Comments & Activities

Production build 0.69.0 2024