Problem/Motivation

Layout builder form submit is being triggered on click of expand/collapse button

Steps to reproduce

1. Go to /admin/config/user-interface/navigation-block page
2. Click on expand/collapse button
3. You will see the LB form submit is triggering and the page is getting refreshed.

Proposed resolution

Add type=submit and type=button to expand/close buttons.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3450253

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

Gauravvvv created an issue. See original summary.

gauravvvv’s picture

Issue tags: +Novice
finnsky’s picture

We need to add type="button" for all UI buttons here. Close, collapse/expand etc

skaught’s picture

@Gauravvvv: what browser are you using?

I have seen results/glitch like this i think more around cache clearing and working with various branch work. this may need some further debugging if it continues.

Proposed resolution: The current resolution is to add BOTH types? This is not a clear direction.
As the actions are JS events/triggers only, button is correct as we do not have a full form submit.

gauravvvv’s picture

@Gauravvvv: what browser are you using?

I am using Chrome 124 on macOS (Sonoma).

SandeepMahlawat’s picture

Version: 11.0.x-dev » 11.x-dev

SandeepMahlawat’s picture

Status: Active » Needs review
finnsky’s picture

Status: Needs review » Reviewed & tested by the community

That changes looks good to me! Thank you!

nod_’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 84a10e08e5 to 11.x and 5171776da4 to 11.0.x and 35e90e3e98 to 10.4.x and ba3afaae29 to 10.3.x. Thanks!

  • nod_ committed ba3afaae on 10.3.x
    Issue #3450253 by SandeepMahlawat, Gauravvvv, finnsky, SKAUGHT:...

  • nod_ committed 35e90e3e on 10.4.x
    Issue #3450253 by SandeepMahlawat, Gauravvvv, finnsky, SKAUGHT:...

  • nod_ committed 5171776d on 11.0.x
    Issue #3450253 by SandeepMahlawat, Gauravvvv, finnsky, SKAUGHT:...

  • nod_ committed 84a10e08 on 11.x
    Issue #3450253 by SandeepMahlawat, Gauravvvv, finnsky, SKAUGHT:...
nod_’s picture

nod_’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.