From 43a21c6b7ba66bcd1b3772736261f913df972791 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Wed, 6 Jul 2022 10:51:00 +0700 Subject: [PATCH] chore(web): reduce layer-change noise --- .../core/web/keyboard-processor/src/text/systemStores.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/core/web/keyboard-processor/src/text/systemStores.ts b/common/core/web/keyboard-processor/src/text/systemStores.ts index 2e8dbc39d4..69cbd6ad54 100644 --- a/common/core/web/keyboard-processor/src/text/systemStores.ts +++ b/common/core/web/keyboard-processor/src/text/systemStores.ts @@ -42,6 +42,11 @@ namespace com.keyman.text { } set(value: string) { + // No need to signal changes when things stay the same. + if(this._value == value) { + return; + } + if(this.handler) { if(this.handler(this, value)) { return; @@ -105,7 +110,7 @@ namespace com.keyman.text { return false; // web matches anything other than 'native' } break; - + case 'native': // This will return true for embedded KeymanWeb case 'ie': @@ -118,7 +123,7 @@ namespace com.keyman.text { return false; } break; - + default: return false; }