Level up your skills at DrupalCon Chicago 2026 with focused Summits and immersive, hands-on Trainings led by community experts.
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
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:
- 3450253-navigation-avoid-layout
changes, plain diff MR !8270
Comments
Comment #2
gauravvvv commentedComment #3
finnsky commentedWe need to add type="button" for all UI buttons here. Close, collapse/expand etc
Comment #4
skaught@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.
Comment #5
gauravvvv commentedI am using Chrome 124 on macOS (Sonoma).
Comment #6
SandeepMahlawat commentedComment #8
SandeepMahlawat commentedComment #9
finnsky commentedThat changes looks good to me! Thank you!
Comment #11
nod_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!
Comment #16
nod_Comment #17
nod_