mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-03-09 07:10:16 +00:00
Move caret coordinate function into TAC namespace too
This commit is contained in:
@@ -364,7 +364,7 @@ function showResults(textArea) {
|
||||
parentDiv.style.display = "flex";
|
||||
|
||||
if (TAC.CFG.slidingPopup) {
|
||||
let caretPosition = CaretUtils.getCaretCoordinates(textArea, textArea.selectionEnd);
|
||||
let caretPosition = TAC.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);
|
||||
|
||||
Reference in New Issue
Block a user