mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-07 12:33:36 +09:00
## Description Shared link name is not editable because every input change closes popover with the input. Here is the fix and the explanation. This is already fixed in rc radix versions and will be in the next stable release https://github.com/radix-ui/primitives/blob/28bebf2c6992d056244845c898abeff45dec2871/packages/react/focus-scope/src/FocusScope.tsx#L115 Without this PR the issue looks: Editing input <img width="353" alt="image" src="https://github.com/webstudio-is/webstudio/assets/5077042/b6ba547c-4286-45f2-b351-9122780cb482"> cause this button <img width="216" alt="image" src="https://github.com/webstudio-is/webstudio/assets/5077042/4d6a26c3-3336-4995-b0b4-c38200e34e07"> to switch onto `pending` state <img width="211" alt="image" src="https://github.com/webstudio-is/webstudio/assets/5077042/f214d9a9-3454-4b1b-8603-48224fa370d1"> what cause handleMutations to move focus onto parent popover Child popover lost focus and closes. ## Steps for reproduction Click Share, Edit link name, see it works ## 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 - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 5de6) - [ ] 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.example` and the `builder/env-check.js` if mandatory