]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Allow Ctrl-click to keep EmojiPicker window open
authorBrian C. Lindner <cslindner@gmail.com>
Sun, 31 May 2020 18:34:34 +0000 (14:34 -0400)
committerThibaut Girka <thib@sitedethib.com>
Mon, 1 Jun 2020 16:31:42 +0000 (18:31 +0200)
Port 64154c5161d4d5c82877fba549d72068cc7f9e16 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
app/javascript/flavours/glitch/features/emoji_picker/index.js

index 3717fcd828adf22a18be776a7d1f3b5b05ef0716..14e5cb94a786499d74c0e913118f253880a21615 100644 (file)
@@ -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);
   }