about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/emoji_picker
diff options
context:
space:
mode:
authorBrian C. Lindner <cslindner@gmail.com>2020-05-31 14:34:34 -0400
committerThibaut Girka <thib@sitedethib.com>2020-06-01 18:31:42 +0200
commita8559458c3dece078db3e087973bfee10379318a (patch)
treee6d66c744256e193f7dea91a22799f63e5aca116 /app/javascript/flavours/glitch/features/emoji_picker
parent89de02f7aa739b4f671c93f8538e17b2189f111f (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.js7
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);
   }