| Index: chrome/browser/resources/new_new_tab.js
|
| ===================================================================
|
| --- chrome/browser/resources/new_new_tab.js (revision 22763)
|
| +++ chrome/browser/resources/new_new_tab.js (working copy)
|
| @@ -905,8 +905,6 @@
|
|
|
| OptionMenu.prototype = {
|
| show: function() {
|
| - windowTooltip.hide();
|
| -
|
| this.menu.style.display = 'block';
|
| this.button.focus();
|
|
|
| @@ -1144,12 +1142,19 @@
|
| WindowTooltip.prototype = {
|
| timer: 0,
|
| handleMouseOver: function(e, linkEl, tabs) {
|
| - document.addEventListener('mousemove', WindowTooltip.trackMouseMove_);
|
| + this.linkEl_ = linkEl;
|
| + if (e.type == 'mouseover') {
|
| + this.linkEl_.addEventListener('mousemove', WindowTooltip.trackMouseMove_);
|
| + this.linkEl_.addEventListener('mouseout', this.boundHandleMouseOut_);
|
| + } else { // focus
|
| + this.linkEl_.addEventListener('blur', this.boundHide_);
|
| + }
|
| this.timer = window.setTimeout(bind(this.show, this, e.type, linkEl, tabs),
|
| 300);
|
| },
|
| show: function(type, linkEl, tabs) {
|
| - document.removeEventListener('mousemove', WindowTooltip.trackMouseMove_);
|
| + this.linkEl_.removeEventListener('mousemove',
|
| + WindowTooltip.trackMouseMove_);
|
| clearTimeout(this.timer);
|
|
|
| processData('#window-tooltip', tabs);
|
| @@ -1173,12 +1178,6 @@
|
| this.tooltipEl.style.top = 20 + WindowTooltip.clientY + bodyRect.top +
|
| 'px';
|
| }
|
| -
|
| - if (type == 'focus') {
|
| - linkEl.onblur = this.boundHide_;
|
| - } else { // mouseover
|
| - linkEl.onmouseout = this.boundHandleMouseOut_;
|
| - }
|
| },
|
| handleMouseOut: function(e) {
|
| // Don't hide when move to another item in the link.
|
| @@ -1193,7 +1192,12 @@
|
| },
|
| hide: function() {
|
| window.clearTimeout(this.timer);
|
| - document.removeEventListener('mousemove', WindowTooltip.trackMouseMove_);
|
| + this.linkEl_.removeEventListener('mousemove',
|
| + WindowTooltip.trackMouseMove_);
|
| + this.linkEl_.removeEventListener('mouseout', this.boundHandleMouseOut_);
|
| + this.linkEl_.removeEventListener('blur', this.boundHide_);
|
| + this.linkEl_ = null;
|
| +
|
| this.tooltipEl.style.display = 'none';
|
| }
|
| };
|
|
|
| Property changes on: chrome\browser\resources\new_new_tab.js
|
| ___________________________________________________________________
|
| Modified: svn:mergeinfo
|
| Merged /trunk/src/chrome/browser/resources/new_new_tab.js:r22567
|
|
|
|
|