From dd23484cf5802ef690bf63f070a2f21c69b7176b Mon Sep 17 00:00:00 2001 From: Sijia Zhao Date: Tue, 19 May 2020 18:58:52 +0100 Subject: [PATCH] Remove need to unfocus/deselect input elements in DlgFromDict before being able to click the "Ok" button GlobalEventHandlers.onchange only fires when focus is lost. However .oninput fires whenever contents are modified. Original requires "double click" behaviour: first click to deselect the input element, second click to actually click the "Ok" button. Old code results in "Ok" buttons remaining visually disabled thus confusing users even when input elements have been completed --- js/core/GUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/core/GUI.js b/js/core/GUI.js index 26dedce..62fb798 100644 --- a/js/core/GUI.js +++ b/js/core/GUI.js @@ -203,7 +203,7 @@ export class GUI const keyId = $.escapeSelector(key) + '_id'; const input = document.getElementById(keyId); if (input) - input.onchange = (event) => GUI._onKeyChange(self, event); + input.oninput = (event) => GUI._onKeyChange(self, event); } // init and open the dialog box: