From b4cc525ca614e6466ab3486d6f999b67a2ec63ae Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 13 Nov 2019 16:52:54 +0100 Subject: [PATCH] Press enter to add a new item in kanban --- www/kanban/inner.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/kanban/inner.js b/www/kanban/inner.js index 74abb7f8d..fb3ed93c1 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -152,6 +152,9 @@ define([ e.preventDefault(); e.stopPropagation(); save(); + if (!$input.val()) { return; } + if (!$(el).closest('.kanban-item').is(':last-child')) { return; } + $(el).closest('.kanban-board').find('.kanban-title-button.fa-plus').click(); return; } if (e.which === 27) { @@ -301,6 +304,8 @@ define([ e.preventDefault(); e.stopPropagation(); save(); + if (!$input.val()) { return; } + $(el).closest('.kanban-board').find('.kanban-title-button.fa-plus').click(); return; } if (e.which === 27) {