Files
webstudio/packages
Oleg Isonen aadf4c034b fix: Keep the resource variable modal open when adding headers (#5665)
## Description

Prevent accidental form submit in the resource variable modal when
adding or removing headers and search params. The icon buttons in the
resource editor were acting as submit buttons, which caused the
new-variable modal to close unexpectedly instead of updating the
resource fields. Updated the builder test-cases document with a manual
regression flow.

## Steps for reproduction

1. Select an element in a project
2. Open Settings for the element
3. Under data variables, create a new variable
4. Set the name
5. Select `resource` as the type
6. Enter a resource URL
7. Add a header
8. Expect the modal to stay open and a new header row to be added
9. Add a search param
10. Expect the modal to stay open and a new search param row to be added


https://github.com/user-attachments/assets/3dff2e22-284b-4548-8565-937255a732bb


## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [x] made a self-review
- [x] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [x] tested locally and on preview environment (preview dev login:
0000)
- [x] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2026-03-27 10:25:35 +01:00
..
2026-01-20 17:25:12 +01:00
2026-01-20 17:25:12 +01:00
2026-03-08 10:52:21 +01:00
2026-03-08 10:52:21 +01:00
2026-01-20 17:25:12 +01:00