mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-05 02:34:07 +02:00
Fix bugs in :emoji_name: update (character count & duplicate keyboard modal)
This commit is contained in:
parent
e8d3e530de
commit
c4d43c9d5b
@ -337,6 +337,7 @@ enabled(){
|
|||||||
|
|
||||||
ele.val(val.substring(0, firstColon)+foundEmoji+val.substring(ele[0].selectionStart));
|
ele.val(val.substring(0, firstColon)+foundEmoji+val.substring(ele[0].selectionStart));
|
||||||
ele[0].selectionEnd = ele[0].selectionStart = firstColon+foundEmoji.length;
|
ele[0].selectionEnd = ele[0].selectionStart = firstColon+foundEmoji.length;
|
||||||
|
ele.trigger("change");
|
||||||
ele.focus();
|
ele.focus();
|
||||||
|
|
||||||
lastEmojiPosition = firstColon+foundEmoji.length;
|
lastEmojiPosition = firstColon+foundEmoji.length;
|
||||||
@ -347,8 +348,9 @@ enabled(){
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
ele.val(val.substring(0, firstColon)+val.substring(ele[0].selectionStart));
|
ele.val(val.substring(0, firstColon)+val.substring(ele[0].selectionStart));
|
||||||
ele[0].selectionEnd = ele[0].selectionStart = firstColon;
|
ele[0].selectionEnd = ele[0].selectionStart = firstColon;
|
||||||
|
ele.trigger("change");
|
||||||
|
|
||||||
me.generateKeyboard($(".emoji-keyboard-popup-btn").offset().left, getKeyboardTop());
|
$(".emoji-keyboard-popup-btn").click();
|
||||||
$(".emoji-keyboard-search").children("input").focus();
|
$(".emoji-keyboard-search").children("input").focus();
|
||||||
document.execCommand("insertText", false, keywords.join(" "));
|
document.execCommand("insertText", false, keywords.join(" "));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user