make floating auto-complete follow horizontal scrolling

This commit is contained in:
LenAnderson 2024-03-31 11:01:20 -04:00
parent b4ad798e77
commit c2ddfdb85d
1 changed files with 1 additions and 0 deletions

View File

@ -2180,6 +2180,7 @@ export function setNewSlashCommandAutoComplete(textarea, isFloating = false) {
clone.append(text.slice(textarea.selectionStart + 1));
document.body.append(clone);
clone.scrollTop = textarea.scrollTop;
clone.scrollLeft = textarea.scrollLeft;
const locatorRect = locator.getBoundingClientRect();
const location = {
left: locatorRect.left,