Merge "Improve page scrolling performance part 2"
diff --git a/polygerrit-ui/app/behaviors/gr-tooltip-behavior/gr-tooltip-behavior.js b/polygerrit-ui/app/behaviors/gr-tooltip-behavior/gr-tooltip-behavior.js
index 4d53631..04d8b6e 100644
--- a/polygerrit-ui/app/behaviors/gr-tooltip-behavior/gr-tooltip-behavior.js
+++ b/polygerrit-ui/app/behaviors/gr-tooltip-behavior/gr-tooltip-behavior.js
@@ -51,7 +51,6 @@
detached() {
this._handleHideTooltip();
- this.unlisten(window, 'scroll', '_handleWindowScroll');
},
_setupTooltipListeners() {
@@ -59,9 +58,6 @@
this._hasSetupTooltipListeners = true;
this.addEventListener('mouseenter', this._handleShowTooltip.bind(this));
- this.addEventListener('mouseleave', this._handleHideTooltip.bind(this));
- this.addEventListener('tap', this._handleHideTooltip.bind(this));
- this.listen(window, 'scroll', '_handleWindowScroll');
},
_handleShowTooltip(e) {
@@ -91,6 +87,9 @@
tooltip.style.visibility = null;
this._tooltip = tooltip;
+ this.listen(window, 'scroll', '_handleWindowScroll');
+ this.listen(this, 'mouseleave', '_handleHideTooltip');
+ this.listen(this, 'tap', '_handleHideTooltip');
},
_handleHideTooltip(e) {
@@ -100,6 +99,9 @@
return;
}
+ this.unlisten(window, 'scroll', '_handleWindowScroll');
+ this.unlisten(this, 'mouseleave', '_handleHideTooltip');
+ this.unlisten(this, 'tap', '_handleHideTooltip');
this.setAttribute('title', this._titleText);
if (this._tooltip && this._tooltip.parentNode) {
this._tooltip.parentNode.removeChild(this._tooltip);
diff --git a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.html b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.html
index 81c6d99..540df98 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.html
+++ b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.html
@@ -108,7 +108,6 @@
cursor: pointer;
}
.content {
- overflow: hidden;
/* Set min width since setting width on table cells still
allows them to shrink. Do not set max width because
CJK (Chinese-Japanese-Korean) glyphs have variable width */