Prevent unrelated buttons from being processed when the modal is opened

Created on 11 November 2024, 6 months ago

Problem/Motivation

If you have a custom block that renders with a button, there can be AJAX issues thrown when trying to open the media library inside Layout Builder.

Steps to reproduce

  • Create a custom block that has a media library field in it's configuration form
  • Make sure the block renders a button element
  • Add the block to a Layout Builder page
  • Try to open the media library in the block configuration
  • Observe AJAX issues when the button from step 2 is processed

Proposed resolution

Set drupalAutoButtons to FALSE in the dialog options

Remaining tasks

Tests
Merge if happy with the result

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇳🇿New Zealand danielveza Brisbane, AU

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024