From 57929e8655f42cbe62c678566c08f5f5c95d0f6f Mon Sep 17 00:00:00 2001 From: Satoshi Noguchi Date: Thu, 27 Apr 2023 22:20:50 +0900 Subject: [PATCH] Fix tab switch issue --- es/DockPanel.js | 4 +--- lib/DockPanel.js | 4 +--- src/DockPanel.tsx | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/es/DockPanel.js b/es/DockPanel.js index af11ef6c..c1843c90 100644 --- a/es/DockPanel.js +++ b/es/DockPanel.js @@ -216,9 +216,7 @@ export class DockPanel extends React.PureComponent { DockPanel._droppingPanel = panel; } onDragOverOtherPanel() { - if (this.state.dropFromPanel) { - this.setState({ dropFromPanel: null }); - } + this.setState({ dropFromPanel: null }); } onPanelCornerDrag(e, corner) { let { parent, x, y, w, h } = this.props.panelData; diff --git a/lib/DockPanel.js b/lib/DockPanel.js index dbacf0b5..4f254957 100644 --- a/lib/DockPanel.js +++ b/lib/DockPanel.js @@ -241,9 +241,7 @@ class DockPanel extends React.PureComponent { DockPanel._droppingPanel = panel; } onDragOverOtherPanel() { - if (this.state.dropFromPanel) { - this.setState({ dropFromPanel: null }); - } + this.setState({ dropFromPanel: null }); } onPanelCornerDrag(e, corner) { let { parent, x, y, w, h } = this.props.panelData; diff --git a/src/DockPanel.tsx b/src/DockPanel.tsx index bac87a3d..d3e58e34 100644 --- a/src/DockPanel.tsx +++ b/src/DockPanel.tsx @@ -71,9 +71,7 @@ export class DockPanel extends React.PureComponent { }; onDragOverOtherPanel() { - if (this.state.dropFromPanel) { - this.setState({dropFromPanel: null}); - } + this.setState({dropFromPanel: null}); } // used both by dragging head and corner