Bug 1520957 - [release 119] Don't toggle breakpoint upon label click (#7673). r=dwalsh
☠☠ backed out by 27034f1841e9 ☠ ☠
authorDavid Walsh <davidwalsh83@gmail.com>
Fri, 18 Jan 2019 09:35:32 -0500
changeset 514524 a6e5efd7b57f750855ef297e81c8fac0468b65aa
parent 514523 c46ddfb551e684d0b774aa21b825c2be02c3ede1
child 514525 51491b0bf8a8686e9b05399173ea75c629dbde01
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwalsh
bugs1520957
milestone66.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 1520957 - [release 119] Don't toggle breakpoint upon label click (#7673). r=dwalsh
devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/Breakpoint.js
devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/tests/__snapshots__/Breakpoint.spec.js.snap
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/Breakpoint.js
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/Breakpoint.js
@@ -63,18 +63,20 @@ class Breakpoint extends PureComponent<P
 
   onDoubleClick = () => {
     const { breakpoint, openConditionalPanel } = this.props;
     if (breakpoint.condition) {
       openConditionalPanel(breakpoint.selectedLocation);
     }
   };
 
-  selectBreakpoint = () => {
+  selectBreakpoint = event => {
     const { breakpoint, selectSpecificLocation } = this.props;
+
+    event.preventDefault();
     selectSpecificLocation(breakpoint.selectedLocation);
   };
 
   removeBreakpoint = event => {
     const { breakpoint, removeBreakpoint } = this.props;
 
     event.stopPropagation();
     removeBreakpoint(breakpoint.selectedLocation);
@@ -154,16 +156,17 @@ class Breakpoint extends PureComponent<P
           className="breakpoint-checkbox"
           checked={!breakpoint.disabled}
           onChange={this.handleBreakpointCheckbox}
           onClick={ev => ev.stopPropagation()}
         />
         <label
           htmlFor={breakpoint.id}
           className="breakpoint-label cm-s-mozilla"
+          onClick={this.selectBreakpoint}
           title={this.getBreakpointText()}
         >
           <span dangerouslySetInnerHTML={this.highlightText()} />
         </label>
         <div className="breakpoint-line-close">
           <div className="breakpoint-line">{this.getBreakpointLocation()}</div>
           <CloseButton
             handleClick={e => this.removeBreakpoint(e)}
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/tests/__snapshots__/Breakpoint.spec.js.snap
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints/tests/__snapshots__/Breakpoint.spec.js.snap
@@ -11,16 +11,17 @@ exports[`Breakpoint disabled 1`] = `
     checked={false}
     className="breakpoint-checkbox"
     onChange={[Function]}
     onClick={[Function]}
     type="checkbox"
   />
   <label
     className="breakpoint-label cm-s-mozilla"
+    onClick={[Function]}
   >
     <span
       dangerouslySetInnerHTML={
         Object {
           "__html": "",
         }
       }
     />
@@ -52,16 +53,17 @@ exports[`Breakpoint paused at a differen
     checked={true}
     className="breakpoint-checkbox"
     onChange={[Function]}
     onClick={[Function]}
     type="checkbox"
   />
   <label
     className="breakpoint-label cm-s-mozilla"
+    onClick={[Function]}
   >
     <span
       dangerouslySetInnerHTML={
         Object {
           "__html": "",
         }
       }
     />
@@ -93,16 +95,17 @@ exports[`Breakpoint paused at a generate
     checked={true}
     className="breakpoint-checkbox"
     onChange={[Function]}
     onClick={[Function]}
     type="checkbox"
   />
   <label
     className="breakpoint-label cm-s-mozilla"
+    onClick={[Function]}
   >
     <span
       dangerouslySetInnerHTML={
         Object {
           "__html": "",
         }
       }
     />
@@ -134,16 +137,17 @@ exports[`Breakpoint paused at an origina
     checked={true}
     className="breakpoint-checkbox"
     onChange={[Function]}
     onClick={[Function]}
     type="checkbox"
   />
   <label
     className="breakpoint-label cm-s-mozilla"
+    onClick={[Function]}
   >
     <span
       dangerouslySetInnerHTML={
         Object {
           "__html": "",
         }
       }
     />
@@ -175,16 +179,17 @@ exports[`Breakpoint simple 1`] = `
     checked={true}
     className="breakpoint-checkbox"
     onChange={[Function]}
     onClick={[Function]}
     type="checkbox"
   />
   <label
     className="breakpoint-label cm-s-mozilla"
+    onClick={[Function]}
   >
     <span
       dangerouslySetInnerHTML={
         Object {
           "__html": "",
         }
       }
     />