From 910623d287c131ec51ff3ec09091a91b5f85d6f2 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Thu, 18 Jan 2018 12:04:00 +0000 Subject: [PATCH] Close context menu on resize. --- src/components/structures/ContextualMenu.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/structures/ContextualMenu.js b/src/components/structures/ContextualMenu.js index f3189c2e4b..7ec078f739 100644 --- a/src/components/structures/ContextualMenu.js +++ b/src/components/structures/ContextualMenu.js @@ -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 = {
{ chevron } - +