DescriptionMake 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
Messages
Total messages: 9 (2 generated)
|