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

Unified Diff: Source/devtools/front_end/ui/Tooltip.js

Issue 1307843002: Devtools UI: Maintain closed tooltips on click on Windows (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/Tooltip.js
diff --git a/Source/devtools/front_end/ui/Tooltip.js b/Source/devtools/front_end/ui/Tooltip.js
index dd5555f058dde93b74e5c6154691768f878fab02..c9ea4a0d7ad5bc48457a2c8eeba3efb8490d4eed 100644
--- a/Source/devtools/front_end/ui/Tooltip.js
+++ b/Source/devtools/front_end/ui/Tooltip.js
@@ -14,7 +14,7 @@ WebInspector.Tooltip = function(doc)
this._tooltipElement = this._shadowRoot.createChild("div", "tooltip");
doc.addEventListener("mousemove", this._mouseMove.bind(this), false);
pfeldman 2015/08/21 17:30:20 I changed these to , true); in one of my previous
samli 2015/08/26 20:15:52 Rebased.
- doc.addEventListener("mousedown", this._hide.bind(this), false);
+ doc.addEventListener("mousedown", this._hide.bind(this, true), false);
}
WebInspector.Tooltip.Timing = {
@@ -106,12 +106,17 @@ WebInspector.Tooltip.prototype = {
this._tooltipElement.positionAt(tooltipX, tooltipY);
},
- _hide: function()
+ /**
+ * @param {boolean=} removeInstant
+ */
+ _hide: function(removeInstant)
{
delete this._anchorElement;
this._tooltipElement.classList.remove("shown");
if (Date.now() > this._tooltipLastOpened)
this._tooltipLastClosed = Date.now();
+ if (removeInstant)
+ delete this._tooltipLastClosed;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698