From 8766965a305b09aee4aa65aa754f84feaf801437 Mon Sep 17 00:00:00 2001 From: DominikDoom Date: Thu, 8 May 2025 12:43:40 +0200 Subject: [PATCH] Credit original author --- javascript/tagAutocomplete.js | 1 + 1 file changed, 1 insertion(+) diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index 7abc11f..4a23ea9 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -364,6 +364,7 @@ function showResults(textArea) { if (TAC_CFG.slidingPopup) { let caretPosition = getCaretCoordinates(textArea, textArea.selectionEnd); + // Top cursor offset fix for SDNext modern UI, based on code by https://github.com/Nyx01 let offsetTop = textArea.offsetTop + caretPosition.top - textArea.scrollTop + 10; // Adjust this value for desired distance below cursor let offsetLeft = Math.min(textArea.offsetLeft - textArea.scrollLeft + caretPosition.left, textArea.offsetWidth - parentDiv.offsetWidth);