• jamiewalch's avatar
    Make pop-up menus more easily dismissable. · 36f3bce5
    jamiewalch authored
    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}
    36f3bce5
menu_button.js 3.17 KB