diff options
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 5c7f5d9e4..f256aff40 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -602,7 +602,11 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b <span style={{ width: "100%", display: "inline-block", cursor: "move" }}>{`${this.selectionTitle}`}</span> </div>; - const leftBounds = this.props.boundsLeft; + let inMainMenuPanel = false; + for (let node = seldoc.ContentDiv; node && !inMainMenuPanel; node = node?.parentNode as any) { + if (node.className === "mainView-mainContent") inMainMenuPanel = true; + } + const leftBounds = inMainMenuPanel ? 0 : this.props.boundsLeft; const topBounds = this.props.boundsTop; bounds.x = Math.max(leftBounds, bounds.x - this._resizeBorderWidth / 2) + this._resizeBorderWidth / 2; bounds.y = Math.max(topBounds, bounds.y - this._resizeBorderWidth / 2 - this._titleHeight) + this._resizeBorderWidth / 2 + this._titleHeight; |