瀏覽代碼

- When writing to minicard, press Shift-Enter on minicard to go to next line below,
to continue writing on same minicard 2nd line.

Thanks to bentiss!

Lauri Ojansivu 6 年之前
父節點
當前提交
7a35099fb9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      client/components/lists/listBody.js

+ 1 - 1
client/components/lists/listBody.js

@@ -260,7 +260,7 @@ BlazeComponent.extendComponent({
 
 
   pressKey(evt) {
   pressKey(evt) {
     // Pressing Enter should submit the card
     // Pressing Enter should submit the card
-    if (evt.keyCode === 13) {
+    if (evt.keyCode === 13 && !evt.shiftKey) {
       evt.preventDefault();
       evt.preventDefault();
       const $form = $(evt.currentTarget).closest('form');
       const $form = $(evt.currentTarget).closest('form');
       // XXX For some reason $form.submit() does not work (it's probably a bug
       // XXX For some reason $form.submit() does not work (it's probably a bug