Fixed form submission with Meta+Enter keyboard shortcut
This commit is contained in:
@@ -14,6 +14,7 @@ Improvements:
|
|||||||
|
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
|
|
||||||
|
* Fixed form submission with Meta+Enter keyboard shortcut
|
||||||
* Removed PHP notices in comment suppression view
|
* Removed PHP notices in comment suppression view
|
||||||
|
|
||||||
Version 1.0.27
|
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
|
// Submit form
|
||||||
Mousetrap.bindGlobal("mod+enter", function() {
|
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
|
// Open board selector
|
||||||
|
|||||||
@@ -45,10 +45,12 @@ Kanboard.Popover.prototype.isOpen = function() {
|
|||||||
Kanboard.Popover.prototype.open = function(link) {
|
Kanboard.Popover.prototype.open = function(link) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
$.get(link, function(content) {
|
if (!self.isOpen()) {
|
||||||
$("body").prepend('<div id="popover-container"><div id="popover-content">' + content + '</div></div>');
|
$.get(link, function(content) {
|
||||||
self.executeOnOpenedListeners();
|
$("body").prepend('<div id="popover-container"><div id="popover-content">' + content + '</div></div>');
|
||||||
});
|
self.executeOnOpenedListeners();
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Kanboard.Popover.prototype.close = function(e) {
|
Kanboard.Popover.prototype.close = function(e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user