mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 09:25:06 +03:00
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:
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
|
||||
|
||||
Reference in new issue
Block a user