diff options
author | bobzel <zzzman@gmail.com> | 2020-12-11 21:39:24 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-12-11 21:39:24 -0500 |
commit | 159687d41ab9265744fda2ca50e30f0f3434686c (patch) | |
tree | 1bb50eab0e9c5221c5b852e32771375903e1a319 /src/client/views/DocumentDecorations.tsx | |
parent | 00d859f5c334fa105e3f6d572b74cb04fa9dd026 (diff) |
fixe documentdecoration selection of menu items in left sidebar
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; |