From 7e30b3ef1e7862bd1899a0bafe376195e453ee4d Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 23 Jun 2019 05:53:25 +0000 Subject: [PATCH] Automatically move focus to empty next sibling, mostly for Link --- architype.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/architype.js b/architype.js index 663ec18..23ca625 100644 --- a/architype.js +++ b/architype.js @@ -559,7 +559,13 @@ class Node extends EditorEntryBase { } stopEdit() { - this.elem_.focus(); + if (this.elem_.nextElementSibling && + this.elem_.nextElementSibling.xArchObj && + this.elem_.nextElementSibling.xArchObj.getLabel() == '') { + this.elem_.nextElementSibling.xArchObj.startEdit(); + } else { + this.elem_.focus(); + } } }