diff options
| author | bob <bcz@cs.brown.edu> | 2020-02-18 14:00:06 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2020-02-18 14:00:06 -0500 |
| commit | 6d7f56cead95b1ab59a62ccc21ee52491386a655 (patch) | |
| tree | b04ad3c04ba2604f0df56afd7e805e403862a41e /src/client/views/DocumentDecorations.tsx | |
| parent | 3c287ad66d84bf4fbd6f626f1590fdd82610762b (diff) | |
cleaned up context menu ordering
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 8e4598339..07cc1d984 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -171,7 +171,9 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> } @action onSettingsClick = (e: PointerEvent): void => { if (e.button === 0 && !e.altKey && !e.ctrlKey) { - this.simulateMouseClick(SelectionManager.SelectedDocuments()[0].ContentDiv!.children[0].children[0], e.clientX, e.clientY + 30, e.screenX, e.screenY + 30); + let child = SelectionManager.SelectedDocuments()[0].ContentDiv!.children[0]; + while (child.children.length && child.className !== "jsx-parser") child = child.children[0]; + this.simulateMouseClick(child.children[0], e.clientX, e.clientY + 30, e.screenX, e.screenY + 30); } } |
