History Action Pop-ups incorrect behavior when document is scrolled.

The Menu Button ui control that the history action pop-ups employ
handle the resize event by hiding the menu.  This CL will similarly
hide the menu on a |scroll| event is triggered.

This resolves the scrolling problem in the referenced bug.

However, this change does not address the reported behavior that the
pop-up remains visible when changing tabs. I tend to agree with
sergiu@ that the existing behavior seems proper.

BUG=222313
TEST=The MenuButton ui element is used in several places; I tested the History, Bookmark Manager and NTP but I can see it also being used in ChromeOS login screen and File Manager which I am unable to test. The change involves hiding the menu pop-up when the document scroll event is triggered.

Review URL: https://chromiumcodereview.appspot.com/13532014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192489 0039d316-1c4b-4281-b951-d872f2087c98
parent 7c2351db
......@@ -132,6 +132,7 @@ cr.define('cr.ui', function() {
e.target.checkable;
this.hideMenu(hideDelayed ? HideType.DELAYED : HideType.INSTANT);
break;
case 'scroll':
case 'resize':
this.hideMenu();
break;
......@@ -164,6 +165,7 @@ cr.define('cr.ui', function() {
this.showingEvents_.add(doc, 'keydown', this, true);
this.showingEvents_.add(doc, 'mousedown', this, true);
this.showingEvents_.add(doc, 'focus', this, true);
this.showingEvents_.add(doc, 'scroll', this, true);
this.showingEvents_.add(win, 'resize', this);
this.showingEvents_.add(this.menu, 'activate', this);
this.positionMenu_();
......
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