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

Issue 592793003: Make pop-up menus more easily dismissable. (Closed)

Created:
6 years, 3 months ago by Jamie
Modified:
6 years, 2 months ago
Reviewers:
Wez
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Make pop-up menus more easily dismissable. Previously, menus were dismissed by adding a click handler to the <body>, but that doesn't intercept clicks on the plugin element and complicates the logic somewhat because a second click on the button while the menu is visible then triggers both the show and hide handlers by default. This CL adds an explicit <div> covering the entire window, but behind the menu in the z-order. This <div> doesn't prevent window dragging, despite being on top of the title-bar, so I've also made that conditional on there being no menu visible. BUG=416307 Committed: https://crrev.com/36f3bce536883275a6cc55ee034d8a5772daad08 Cr-Commit-Position: refs/heads/master@{#296631}

Patch Set 1 #

Patch Set 2 : Add click-trap to the container element, not the body #

Total comments: 4

Patch Set 3 : Added comment and fixed unit tests. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -23 lines) Patch
M remoting/webapp/menu_button.css View 2 chunks +10 lines, -1 line 0 comments Download
M remoting/webapp/menu_button.js View 1 2 1 chunk +19 lines, -13 lines 1 comment Download
M remoting/webapp/unittests/menu_button_unittest.js View 1 2 2 chunks +9 lines, -8 lines 0 comments Download
M remoting/webapp/window_frame.css View 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 9 (2 generated)
Jamie
ptal
6 years, 3 months ago (2014-09-22 20:23:30 UTC) #2
Wez
https://codereview.chromium.org/592793003/diff/20001/remoting/webapp/menu_button.js File remoting/webapp/menu_button.js (right): https://codereview.chromium.org/592793003/diff/20001/remoting/webapp/menu_button.js#newcode55 remoting/webapp/menu_button.js:55: this.clickTrap_.classList.add('menu-button-click-trap'); I think the clickTrap needs some documentation, e.g. ...
6 years, 2 months ago (2014-09-23 16:36:49 UTC) #3
Jamie
ptal https://codereview.chromium.org/592793003/diff/20001/remoting/webapp/menu_button.js File remoting/webapp/menu_button.js (right): https://codereview.chromium.org/592793003/diff/20001/remoting/webapp/menu_button.js#newcode55 remoting/webapp/menu_button.js:55: this.clickTrap_.classList.add('menu-button-click-trap'); On 2014/09/23 16:36:49, Wez wrote: > I ...
6 years, 2 months ago (2014-09-23 21:06:34 UTC) #4
Wez
lgtm https://codereview.chromium.org/592793003/diff/40001/remoting/webapp/menu_button.js File remoting/webapp/menu_button.js (right): https://codereview.chromium.org/592793003/diff/40001/remoting/webapp/menu_button.js#newcode55 remoting/webapp/menu_button.js:55: * plugin element does this. Great description! Even ...
6 years, 2 months ago (2014-09-25 01:47:18 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/592793003/40001
6 years, 2 months ago (2014-09-25 01:48:32 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001) as 9393d89d38fb88e09c442be0e4c955837baa038f
6 years, 2 months ago (2014-09-25 02:45:12 UTC) #8
commit-bot: I haz the power
6 years, 2 months ago (2014-09-25 02:45:47 UTC) #9
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/36f3bce536883275a6cc55ee034d8a5772daad08
Cr-Commit-Position: refs/heads/master@{#296631}

Powered by Google App Engine
This is Rietveld 408576698