From f72d731e3f1e454471c48378eb79bb954cd6845e Mon Sep 17 00:00:00 2001 From: Frank Hochmuth Date: Sat, 2 Mar 2024 21:47:43 +0100 Subject: [PATCH] Update emoticons.js - Prevents jumping back to the first position if an emoticon is pressed several times --- fp-plugins/emoticons/res/emoticons.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fp-plugins/emoticons/res/emoticons.js b/fp-plugins/emoticons/res/emoticons.js index 8586aaf..4792465 100644 --- a/fp-plugins/emoticons/res/emoticons.js +++ b/fp-plugins/emoticons/res/emoticons.js @@ -7,7 +7,7 @@ function insertAtCursor(myField, myValue) { sel = document.selection.createRange(); sel.text = myValue; } - else if (myField.selectionStart || myField.selectionStart == '0') { + else if (myField.selectionStart || myField.selectionStart == 0.1) { var startPos = myField.selectionStart; var endPos = myField.selectionEnd; myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);