From d149579b43d8eed18d2972e6f4e02e6d89ca8d7f Mon Sep 17 00:00:00 2001 From: tje3d Date: Sun, 6 May 2018 10:33:02 +0430 Subject: [PATCH 1/2] Should store range on input too because execCommand wont trigger keyup or mousedown --- wdt-emoji-bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wdt-emoji-bundle.js b/wdt-emoji-bundle.js index a75b451..383c89e 100644 --- a/wdt-emoji-bundle.js +++ b/wdt-emoji-bundle.js @@ -659,7 +659,7 @@ } }); - addListenerMulti(el, 'mouseup keyup', function () { + addListenerMulti(el, 'mouseup keyup input', function () { wdtEmojiBundle.ranges[this.dataset.rangeIndex] = window.getSelection().getRangeAt(0); }); From 3d26dd2086359a9a01e9db8e8c3ebb740537e3bc Mon Sep 17 00:00:00 2001 From: tje3d Date: Sun, 6 May 2018 11:42:19 +0430 Subject: [PATCH 2/2] Emojis not works with autofocus or programmatically focus --- wdt-emoji-bundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wdt-emoji-bundle.js b/wdt-emoji-bundle.js index 383c89e..fe9c084 100644 --- a/wdt-emoji-bundle.js +++ b/wdt-emoji-bundle.js @@ -659,7 +659,7 @@ } }); - addListenerMulti(el, 'mouseup keyup input', function () { + addListenerMulti(el, 'focus mouseup keyup input', function () { wdtEmojiBundle.ranges[this.dataset.rangeIndex] = window.getSelection().getRangeAt(0); });