From 655a1f232ef16a2ea1a19779e6a86fc2ca6d6cf3 Mon Sep 17 00:00:00 2001 From: Kai Labusch Date: Fri, 13 Dec 2019 12:57:59 +0100 Subject: [PATCH] Make edit area of TOKEN resizeable again in order to make editing of longer tokens more comfortable. --- neath.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/neath.js b/neath.js index 1bb7e7a..40f1d37 100644 --- a/neath.js +++ b/neath.js @@ -773,9 +773,16 @@ function setupInterface(data, file, urls) { if (editingTd) { - if (target == editingTd.elem) return; + if (target == $(':focus')) return; + if ($.contains($(':focus')[0], target)) return; + if ($.contains(target, $(':focus')[0])) return; + + let refocus = $(':focus'); + + editingTd.finish(true); + + refocus.focus(); - editingTd.finish(editingTd.elem, true); } if (!$.contains($('#table')[0], target)) return