Bug 1573241 - close conditionalPanel on right gutter click r=davidwalsh
authorAlex Rosenfeld <arosenfeld2003@mac.com>
Tue, 13 Aug 2019 19:39:59 +0000
changeset 487958 186c61bb0efffb6a8c23752b69675cd922bde64f
parent 487957 f815b5977a4f766bf1b9624dbc4b9bb6395d3d72
child 487959 71b7ef6e0ed8b224e2715f894887587b1a80b34e
push id36434
push usercbrindusan@mozilla.com
push dateThu, 15 Aug 2019 09:44:30 +0000
treeherdermozilla-central@144fbfb409b7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidwalsh
bugs1573241
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1573241 - close conditionalPanel on right gutter click r=davidwalsh On a right click to the gutter, close any previously opened conditionalPanel. r=davidwalsh Differential Revision: https://phabricator.services.mozilla.com/D41694
devtools/client/debugger/src/components/Editor/index.js
--- a/devtools/client/debugger/src/components/Editor/index.js
+++ b/devtools/client/debugger/src/components/Editor/index.js
@@ -330,22 +330,29 @@ class Editor extends PureComponent<Props
     event.preventDefault();
 
     const {
       cx,
       selectedSourceWithContent,
       breakpointActions,
       editorActions,
       isPaused,
+      conditionalPanelLocation,
+      closeConditionalPanel,
     } = this.props;
     const { editor } = this.state;
     if (!selectedSourceWithContent || !editor) {
       return;
     }
 
+    // only allow one conditionalPanel location.
+    if (conditionalPanelLocation) {
+      closeConditionalPanel();
+    }
+
     const target: Element = (event.target: any);
     const { id: sourceId } = selectedSourceWithContent.source;
     const line = lineAtHeight(editor, sourceId, event);
 
     if (typeof line != "number") {
       return;
     }