From 5a4271268b72c1e878c224b7290474ed70d787cd Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Wed, 17 Jan 2018 15:40:47 +0000 Subject: [PATCH] Keep reference to stickers menu --- src/components/views/rooms/Stickerpack.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/Stickerpack.js b/src/components/views/rooms/Stickerpack.js index 7afad74a4c..4bcb426a35 100644 --- a/src/components/views/rooms/Stickerpack.js +++ b/src/components/views/rooms/Stickerpack.js @@ -134,7 +134,7 @@ export default class Stickerpack extends React.Component { const x = buttonRect.right + window.pageXOffset - 37; const y = (buttonRect.top + (buttonRect.height / 2) + window.pageYOffset) - 19; // const self = this; - ContextualMenu.createMenu(GenericElementContextMenu, { + this.stickersMenu = ContextualMenu.createMenu(GenericElementContextMenu, { chevronOffset: 10, chevronFace: 'bottom', left: x, @@ -150,11 +150,12 @@ export default class Stickerpack extends React.Component { } onHideStickersClick(ev) { - this.setState({showStickers: false}); + this.stickersMenu.close(); } onFinished() { this.setState({showStickers: false}); + this.stickersMenu = null; } _launchManageIntegrations() {