diff options
Diffstat (limited to 'assets/js/src/App.js')
-rw-r--r-- | assets/js/src/App.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/assets/js/src/App.js b/assets/js/src/App.js index 62e091fc..3fe75640 100644 --- a/assets/js/src/App.js +++ b/assets/js/src/App.js @@ -42,7 +42,17 @@ Kanboard.App.prototype.keyboardShortcuts = function() { // Submit form Mousetrap.bindGlobal("mod+enter", function() { - $("form").submit(); + var forms = $("form"); + + if (forms.length == 1) { + forms.submit(); + } else if (forms.length > 1) { + if (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName === 'TEXTAREA') { + $(document.activeElement).parents("form").submit(); + } else if (self.get("Popover").isOpen()) { + $("#popover-container form").submit(); + } + } }); // Open board selector |