Fixed form submission with Meta+Enter keyboard shortcut
This commit is contained in:
parent
2a574c408e
commit
ab02a9a162
|
|
@ -14,6 +14,7 @@ Improvements:
|
|||
|
||||
Bug fixes:
|
||||
|
||||
* Fixed form submission with Meta+Enter keyboard shortcut
|
||||
* Removed PHP notices in comment suppression view
|
||||
|
||||
Version 1.0.27
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -45,10 +45,12 @@ Kanboard.Popover.prototype.isOpen = function() {
|
|||
Kanboard.Popover.prototype.open = function(link) {
|
||||
var self = this;
|
||||
|
||||
$.get(link, function(content) {
|
||||
$("body").prepend('<div id="popover-container"><div id="popover-content">' + content + '</div></div>');
|
||||
self.executeOnOpenedListeners();
|
||||
});
|
||||
if (!self.isOpen()) {
|
||||
$.get(link, function(content) {
|
||||
$("body").prepend('<div id="popover-container"><div id="popover-content">' + content + '</div></div>');
|
||||
self.executeOnOpenedListeners();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Kanboard.Popover.prototype.close = function(e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue