This is an automated email from the ASF dual-hosted git repository. enzomartellucci pushed a commit to branch enxdev/fix/custom-tabs in repository https://gitbox.apache.org/repos/asf/superset.git
commit ad53a4c744f812df99dda6fb704cf4c5ddb44928 Author: Enzo Martellucci <[email protected]> AuthorDate: Fri Jan 2 12:02:41 2026 +0100 fix(dashboard): disable drag on input fields during tab reorder Prevents drag activation when clicking on input/textarea elements, allowing users to edit tab titles without accidentally triggering drag-and-drop reordering --- .../gridComponents/TabsRenderer/TabsRenderer.tsx | 31 +++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/dashboard/components/gridComponents/TabsRenderer/TabsRenderer.tsx b/superset-frontend/src/dashboard/components/gridComponents/TabsRenderer/TabsRenderer.tsx index 906150a5f3..01572d3f5b 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/TabsRenderer/TabsRenderer.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/TabsRenderer/TabsRenderer.tsx @@ -37,6 +37,36 @@ import { useSensor, closestCenter, } from '@dnd-kit/core'; + +const isInteractiveElement = (element: HTMLElement | null): boolean => { + if (!element) return false; + const tagName = element.tagName.toUpperCase(); + if ( + tagName === 'INPUT' || + tagName === 'TEXTAREA' || + element.isContentEditable + ) { + return true; + } + return isInteractiveElement(element.parentElement); +}; + +PointerSensor.activators = [ + { + eventName: 'onPointerDown' as const, + handler: ({ nativeEvent: event }, { onActivation }) => { + if ( + event.button !== 0 || + isInteractiveElement(event.target as HTMLElement) + ) { + return false; + } + onActivation?.({ event }); + return true; + }, + }, +]; + import { horizontalListSortingStrategy, SortableContext, @@ -235,7 +265,6 @@ const TabsRenderer = memo<TabsRendererProps>( type={editMode ? 'editable-card' : 'card'} items={tabItems} tabBarStyle={{ paddingLeft: tabBarPaddingLeft }} - fullHeight {...(editMode && { renderTabBar: (tabBarProps, DefaultTabBar) => ( <DndContext
