Credit original author

pull/335/head 3.3.0
DominikDoom 2025-05-08 12:43:40 +02:00
parent 34e68e1628
commit 8766965a30
1 changed files with 1 additions and 0 deletions

View File

@ -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);