Преглед на файлове

Merge pull request #247 from crowi/fix-ctrl-tab

Fix the tab key handler. when pressed ctrl+tab key, nothing to do
Norio Suzuki преди 8 години
родител
ревизия
e33c2fe2f7
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      resource/js/crowi-form.js

+ 6 - 0
resource/js/crowi-form.js

@@ -182,6 +182,12 @@ $(function() {
     var text = $target.val();
     var pos = $target.selection('getPos');
 
+    // When the user presses CTRL + TAB, it is a case to control the tab of the browser
+    // (for Firefox 54 on Windows)
+    if (event.ctrlKey === true) {
+      return;
+    }
+
     if (currentLine) {
       $target.selection('setPos', {start: currentLine.start, end: (currentLine.end - 1)});
     }