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

Unified Diff: third_party/polymer/v1_0/components-chromium/paper-tooltip/paper-tooltip-extracted.js

Issue 1766433002: Roll Polymer to 1.3.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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/polymer/v1_0/components-chromium/paper-tooltip/paper-tooltip-extracted.js
diff --git a/third_party/polymer/v1_0/components-chromium/paper-tooltip/paper-tooltip-extracted.js b/third_party/polymer/v1_0/components-chromium/paper-tooltip/paper-tooltip-extracted.js
index 7946ae48b46d315f1c8bd0df467fc86ef37d3901..ed84ac2f51a755320f4281e4f0868f7fa50f525c 100644
--- a/third_party/polymer/v1_0/components-chromium/paper-tooltip/paper-tooltip-extracted.js
+++ b/third_party/polymer/v1_0/components-chromium/paper-tooltip/paper-tooltip-extracted.js
@@ -21,6 +21,15 @@ Polymer({
},
/**
+ * Set this to true if you want to manually control when the tooltip
+ * is shown or hidden.
+ */
+ manualMode: {
+ type: Boolean,
+ value: false
+ },
+
+ /**
* Positions the tooltip to the top, right, bottom, left of its content.
*/
position: {
@@ -122,6 +131,9 @@ Polymer({
attached: function() {
this._target = this.target;
+ if (this.manualMode)
+ return;
+
this.listen(this._target, 'mouseenter', 'show');
this.listen(this._target, 'focus', 'show');
this.listen(this._target, 'mouseleave', 'hide');
@@ -130,7 +142,7 @@ Polymer({
},
detached: function() {
- if (this._target) {
+ if (this._target && !this.manualMode) {
this.unlisten(this._target, 'mouseenter', 'show');
this.unlisten(this._target, 'focus', 'show');
this.unlisten(this._target, 'mouseleave', 'hide');
@@ -183,7 +195,7 @@ Polymer({
},
updatePosition: function() {
- if (!this._target)
+ if (!this._target || !this.offsetParent)
return;
var offset = this.offset;

Powered by Google App Engine
This is Rietveld 408576698