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 Review URL: https://codereview.chromium.org/592793003 Cr-Commit-Position: refs/heads/master@{#296631}
Showing
Please register or sign in to comment