fix(studio): close popover menu when dragging block (FE-4301) (#49912)

## Summary

* Closes the block options popover (grip dropdown menu) when a drag
operation starts on that block
* Fixes the issue where the menu would remain visible during the drag if
it was already open

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Section action menus now remain closed when dragging begins,
preventing delayed reopening and keeping the editing interface clear and
focused.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Charis authored and GitHub committed 2026-09-04 09:39:42 -04:00
1 parent 2ee0108928
commit 1308a1d0d0
1 file changed
+5 -1
@@ -27,7 +27,11 @@ export const SortableSection = ({
useDndMonitor({
onDragStart: (event) => {
if (event.active.id === id) isDraggingRef.current = true
if (event.active.id === id) {
isDraggingRef.current = true
clearTimeout(openTimeoutRef.current)
setMenuOpen(false)
}
},
onDragEnd: (event) => {
if (event.active.id === id) isDraggingRef.current = false