Generated with the help of an LLM.

Problem/Motivation

On the Layout Builder "Add block" form, autoOpenModal() sets auto_open on the entity browser button so the browser opens straight away. Selecting or creating an entity closes the modal and rebuilds the form over AJAX, and the rebuilt
button still has auto_open set, so entity browser clicks it and the modal reopens. hideOpenBrowserButton() was meant to prevent this, but it is never registered as a #process callback.

Steps to reproduce

Create or select an entity to add to the layout, and watch the modal come back when you hit the select button.

Proposed resolution

Lets skip auto_open when the form already has a selection or a default value, using the same checks as hideOpenBrowserButton().

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

deviantintegral created an issue.