From a26f01e49c272810808f6b981f224c5224554516 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Wed, 30 Sep 2020 21:01:24 -0400 Subject: [PATCH] Use custom event on ALL SuperTextEditor actions --- js/src/common/utils/SuperTextarea.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/common/utils/SuperTextarea.js b/js/src/common/utils/SuperTextarea.js index 6ff5cfb23..eebb4c487 100644 --- a/js/src/common/utils/SuperTextarea.js +++ b/js/src/common/utils/SuperTextarea.js @@ -22,6 +22,8 @@ export default class SuperTextarea { */ setValue(value) { this.$.val(value).trigger('input'); + + this.el.dispatchEvent(new CustomEvent('input', { bubbles: true, cancelable: true })); } /** @@ -49,8 +51,6 @@ export default class SuperTextarea { */ insertAtCursor(text) { this.insertAt(this.el.selectionStart, text); - - this.el.dispatchEvent(new CustomEvent('input', { bubbles: true, cancelable: true })); } /**