From 1dae4ececef4ed96b248fae962187a123df7d45f Mon Sep 17 00:00:00 2001 From: MattMo Date: Wed, 5 May 2021 03:09:13 -0700 Subject: [PATCH] Value onKeyUp now gets reset if the value changed before the keyup event fired. --- ignite-template.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ignite-template.js b/ignite-template.js index ec656c7..aa27d21 100644 --- a/ignite-template.js +++ b/ignite-template.js @@ -178,7 +178,11 @@ class IgniteTemplate { if (reflect != null && ((typeof (reflect) == "boolean" && reflect == true) || reflect instanceof Function)) { var keyUpDelay = null; var valueChanged = () => { - keyUpDelay = null; + if (keyUpDelay) { + clearTimeout(keyUpDelay); + keyUpDelay = null; + } + var newValue = null; var type = this.element.hasAttribute("type") ? this.element.getAttribute("type").toLowerCase().trim() : null;