From 0d707be2344bfd042819f0416cea83fefbac730f Mon Sep 17 00:00:00 2001 From: atrc445 Date: Sun, 26 Sep 2021 15:02:38 +0200 Subject: [PATCH] reomve jquery .data --- files/templates/emoji_modal.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/templates/emoji_modal.html b/files/templates/emoji_modal.html index 229489e24..04714a29f 100644 --- a/files/templates/emoji_modal.html +++ b/files/templates/emoji_modal.html @@ -30,7 +30,7 @@ function getEmoji(searchTerm, form) { const commentBox = document.getElementById(form); const old = commentBox.value; - const curPos = commentBox.data(TEXTAREA_POS); + const curPos = commentBox.getAttribute('data-' + TEXTAREA_POS); const firstHalf = old.slice(0, curPos) const lastHalf = old.slice(curPos) @@ -48,7 +48,7 @@ const newPos = curPos + emoji.length - commentBox.data(TEXTAREA_POS, newPos) + commentBox.setAttribute('data-' + TEXTAREA_POS, newPos); } function loadEmojis(form) { @@ -92,7 +92,7 @@ container.innerHTML = container.innerHTML.replace(/@form@/g, form) const commentBox = document.getElementById(form); - commentBox.data(TEXTAREA_POS, commentBox.selectionStart) + commentBox.setAttribute('data-' + TEXTAREA_POS, commentBox.selectionStart); for (i=0; i < emojis.length; i++) {