Close context menu on resize.
This commit is contained in:
parent
917d85d603
commit
910623d287
1 changed files with 6 additions and 1 deletions
|
@ -59,6 +59,11 @@ module.exports = {
|
|||
}
|
||||
};
|
||||
|
||||
// Close the menu on window resize
|
||||
const windowResize = function() {
|
||||
closeMenu();
|
||||
};
|
||||
|
||||
const position = {};
|
||||
let chevronFace = null;
|
||||
|
||||
|
@ -135,7 +140,7 @@ module.exports = {
|
|||
<div className={className} style={position}>
|
||||
<div className={menuClasses} style={menuStyle}>
|
||||
{ chevron }
|
||||
<Element {...props} onFinished={closeMenu} />
|
||||
<Element {...props} onFinished={closeMenu} onResize={windowResize} />
|
||||
</div>
|
||||
<div className="mx_ContextualMenu_background" onClick={closeMenu}></div>
|
||||
<style>{ chevronCSS }</style>
|
||||
|
|
Loading…
Reference in a new issue