Bug 1187582 - Opening a link in markup view attributes shouldn't trigger a drag;r=bgrins
authorJohn Pavlicek <sr71pav@gmail.com>
Wed, 29 Jul 2015 14:39:59 -0700
changeset 286966 110b4a6848ab577836faf87a58ebe13458b32d7f
parent 286965 0a2ea3f59b1b3ee44b484cf728827706b0a9a098
child 286967 ee18f1f6fdd499118dbec2b493f4119600e3f4d6
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1187582
milestone42.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 1187582 - Opening a link in markup view attributes shouldn't trigger a drag;r=bgrins
browser/devtools/markupview/markup-view.js
--- a/browser/devtools/markupview/markup-view.js
+++ b/browser/devtools/markupview/markup-view.js
@@ -1930,16 +1930,17 @@ MarkupContainer.prototype = {
 
     let isMiddleClick = event.button === 1;
     let isMetaClick = event.button === 0 && (event.metaKey || event.ctrlKey);
 
     if (isMiddleClick || isMetaClick) {
       let link = target.dataset.link;
       let type = target.dataset.type;
       this.markup._inspector.followAttributeLink(type, link);
+      return;
     }
 
     // Start dragging the container after a delay.
     this.markup._dragStartEl = target;
     setTimeout(() => {
       // Make sure the mouse is still down and on target.
       if (!this._isMouseDown || this.markup._dragStartEl !== target ||
           this.node.isPseudoElement || this.node.isAnonymous ||