Dialog form button logic is too greedy

Created on 19 April 2024, 8 months ago
Updated 3 May 2024, 8 months ago

Problem/Motivation

πŸ› Modal form actions broken if subform has validation errors or certain AJAX callbacks Fixed made a valuable change to the way that the submit buttons (input[type="submit"]) and button links (a.button) are positioned in the button pane of the paragraph component form dialog, to make it work properly even if form validation errors updating the form via AJAX. Unfortunately it made the logic greedier and now does not only move the main form buttons into the button pane, but all submit buttons and button links.

Steps to reproduce

- Create a paragraph with a field where the field widget contains a submit button, e.g. an entity reference field to a media entity, which would include an "Add media" button.
- Make that field required
- Add a paragraph field to a node type using that paragraph
- Create a node for that node type
- Edit the paragraph and see the "Add media" button is now also moved to the dialogs button pane

Proposed resolution

Make the logic less greedy by applying the same selectors that had been used originally.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

User interface

Created by

πŸ‡©πŸ‡ͺGermany berliner

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