From 2cbaade0d5344a64fd50a2c0db6560d6d58ce739 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Thu, 11 Jul 2019 16:23:41 +0000 Subject: [PATCH] Fix bugs in previous change --- EditorGroup.js | 5 +++-- EditorLink.js | 9 +++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/EditorGroup.js b/EditorGroup.js index 022df86..d1ea11b 100644 --- a/EditorGroup.js +++ b/EditorGroup.js @@ -22,8 +22,9 @@ class EditorGroup extends EditorEntryBase { afterDomAdd() { this.nodes_.selectNext(); - if (this.nodes_.getSelected().getValue() == '') { - this.nodes_.getSelected().xArchObj.startEdit(); + let node = this.nodes_.getSelected().xArchObj; + if (node.getLabel() == '') { + node.startEdit(); } } diff --git a/EditorLink.js b/EditorLink.js index b4a27fa..a508ab4 100644 --- a/EditorLink.js +++ b/EditorLink.js @@ -19,12 +19,9 @@ class EditorLink extends EditorEntryBase { afterDomAdd() { this.nodes_.selectNext(); - if (this.nodes_.getSelected().getValue() != '') { - // Select second link if first is pre-filled - this.nodes_.selectNext(); - } - if (this.nodes_.getSelected().getValue() == '') { - this.nodes_.getSelected().xArchObj.startEdit(); + let node = this.nodes_.getSelected().xArchObj; + if (node.getLabel() == '') { + node.startEdit(); } }