]> cat aescling's git repositories - mastodon.git/commitdiff
Allow Ctrl-click to keep EmojiPicker window open (#13896)
authorBrian C. Lindner <cslindner@gmail.com>
Sun, 31 May 2020 18:34:34 +0000 (14:34 -0400)
committerGitHub <noreply@github.com>
Sun, 31 May 2020 18:34:34 +0000 (20:34 +0200)
app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js

index 582bb0d39ce50f05ba9c103f9ecfbae847ecdac7..a6186010b4f7be9dbfcdd9791c59b02e4dfcf55f 100644 (file)
@@ -199,12 +199,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);
   }