Commit f7024a1e authored by samli@chromium.org's avatar samli@chromium.org

Devtools UI: Maintain closed tooltips on click on Windows

BUG=522796

Review URL: https://codereview.chromium.org/1307843002

git-svn-id: svn://svn.chromium.org/blink/trunk@201266 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5180bdb4
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment