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

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 9a942801937eaab6053ab296c06bd97a260ee820..5e7370ac3abf6b0e98a22942689e3b78e9822c6d 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), true);
- doc.addEventListener("mousedown", this._hide.bind(this), true);
+ doc.addEventListener("mousedown", this._hide.bind(this, true), true);
}
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