Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1265)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js

Issue 2163893003: Start sending auxclick instead of click for non-primary buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding remote debugging auxclick polyfill Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js b/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
index 007e68e654979e77f00907ef094dffaeb84aa7a1..eeece70f3a4c115f0b86247139c0d03abfff1053 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
@@ -364,7 +364,7 @@ function TreeElement(title, expandable)
this._listItemNode.addEventListener("mousedown", this._handleMouseDown.bind(this), false);
this._listItemNode.addEventListener("selectstart", this._treeElementSelectStart.bind(this), false);
this._listItemNode.addEventListener("click", this._treeElementToggled.bind(this), false);
- this._listItemNode.addEventListener("dblclick", this._handleDoubleClick.bind(this), false);
+ this._listItemNode.addEventListener("auxclick", this._treeElementToggled.bind(this), false);
dgozman 2016/08/03 20:54:28 Why change this? Are you going to stop sending dbl
Navid Zolghadr 2016/08/03 21:35:20 We stopped sending dblclick for middle button but
dgozman 2016/08/03 22:31:49 I cannot repro the behavior you mention on linux.
Navid Zolghadr 2016/08/04 14:42:05 Sure. done.
this._childrenListNode = createElement("ol");
this._childrenListNode.parentTreeElement = this;
@@ -784,6 +784,20 @@ TreeElement.prototype = {
_treeElementToggled: function(event)
{
var element = event.currentTarget;
+
+ // Handling dblclick
+ if (event.detail === 2) {
+ if (!element || element.treeElement !== this)
+ return;
+
+ var handled = this.ondblclick(event);
+ if (handled)
+ return;
+ if (this._expandable && !this.expanded)
+ this.expand();
+ return;
+ }
+
if (element._selectionStarted) {
delete element._selectionStarted;
var selection = element.getComponentSelection();
@@ -837,22 +851,6 @@ TreeElement.prototype = {
this.selectOnMouseDown(event);
},
- /**
- * @param {!Event} event
- */
- _handleDoubleClick: function(event)
- {
- var element = event.currentTarget;
- if (!element || element.treeElement !== this)
- return;
-
- var handled = this.ondblclick(event);
- if (handled)
- return;
- if (this._expandable && !this.expanded)
- this.expand();
- },
-
_detach: function()
{
this._listItemNode.remove();

Powered by Google App Engine
This is Rietveld 408576698