From 5527cd52d409e6db60d076dc1a272f61def2e9fb Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 14 Jul 2019 19:15:53 +0000 Subject: [PATCH] Focus editor elements when highlighting them by clicking the diagram. --- Grid.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Grid.js b/Grid.js index 2c8e1a6..6249868 100644 --- a/Grid.js +++ b/Grid.js @@ -158,7 +158,11 @@ class Grid { elem.addEventListener('click', () => { let editorElem = document.getElementById(id); + if (!editorElem) { + return; + } editorElem.xArchObj.toggleHighlight(); + editorElem.focus(); }); }