diff options
author | Brian C. Lindner <cslindner@gmail.com> | 2020-05-31 14:34:34 -0400 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2020-06-01 18:31:42 +0200 |
commit | a8559458c3dece078db3e087973bfee10379318a (patch) | |
tree | e6d66c744256e193f7dea91a22799f63e5aca116 /app/javascript/flavours/glitch/features/emoji_picker | |
parent | 89de02f7aa739b4f671c93f8538e17b2189f111f (diff) |
[Glitch] Allow Ctrl-click to keep EmojiPicker window open
Port 64154c5161d4d5c82877fba549d72068cc7f9e16 to glitch-soc Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/emoji_picker')
-rw-r--r-- | app/javascript/flavours/glitch/features/emoji_picker/index.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/emoji_picker/index.js b/app/javascript/flavours/glitch/features/emoji_picker/index.js index 3717fcd82..14e5cb94a 100644 --- a/app/javascript/flavours/glitch/features/emoji_picker/index.js +++ b/app/javascript/flavours/glitch/features/emoji_picker/index.js @@ -279,12 +279,13 @@ class EmojiPickerMenu extends React.PureComponent { }; } - handleClick = emoji => { + handleClick = (emoji, event) => { if (!emoji.native) { emoji.native = emoji.colons; } - - this.props.onClose(); + if (!event.ctrlKey) { + this.props.onClose(); + } this.props.onPick(emoji); } |