summaryrefslogtreecommitdiff
path: root/assets/js/src/App.js
diff options
context:
space:
mode:
authorImbasaur <yarrusg@gmail.com>2016-04-29 15:20:48 +0200
committerImbasaur <yarrusg@gmail.com>2016-04-29 15:20:48 +0200
commit7459bc1c40af72441ccdaff944ef2dc9465ba9bf (patch)
treefea088cdda93079aee9e719a1bbe8464358efbb0 /assets/js/src/App.js
parent99f275e5bb033cca33eee87b0e914645730f13d1 (diff)
parent81a25cbe6328eab7c4de0befc64186610ecc7f49 (diff)
Merge pull request #2 from fguillot/master
merge
Diffstat (limited to 'assets/js/src/App.js')
-rw-r--r--assets/js/src/App.js12
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