From c46d0139c1ec4d7e02b50beaa2bc3ea3c23e66a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Wed, 7 Oct 2020 10:56:50 +0200 Subject: [PATCH] Fire change event after completion to allow Angular to update its state --- content.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content.js b/content.js index 3c7a19c..904a9a0 100644 --- a/content.js +++ b/content.js @@ -64,6 +64,8 @@ class TabCompletion { ' ' + input.value.substring(input.selectionStart); input.selectionStart = start + this[`suggestion_${symbol}`].length + 2; input.selectionEnd = input.selectionStart; + + input.dispatchEvent(new Event('change', {'bubbles': true})); } }