Skip to content

Fix autocomplete popup jump on long scrolled prompts - #86

Open
Comahar wants to merge 1 commit into
newtextdoc1111:mainfrom
Comahar:fix/long-prompt-popup-position-upstream
Open

Comahar wants to merge 1 commit into
newtextdoc1111:mainfrom
Comahar:fix/long-prompt-popup-position-upstream

Conversation

@Comahar

@Comahar Comahar commented Nov 11, 2026

Copy link
Copy Markdown

Long prompts + caret near the bottom made the suggestion list show up at the bottom of the screen and sometimes scroll the whole page.

This change:

  • uses fixed positioning and the same caret math as ComfyUI-Custom-Scripts
  • moves the caret mirror off-screen so it does not stretch the document
  • scrolls only inside the suggestion list (no page scrollIntoView)

Builds on the idea in #74 but that PR only flips the scrollTop sign; this also fixes list highlight scrolling and document height from the mirror div.

Test plan

  • Scroll a long prompt down, type to open autocomplete — list stays at the caret
  • Arrow through suggestions — page should not jump

Use viewport-fixed positioning and ComfyUI-Custom-Scripts caret math,
keep the caret mirror off-screen, and scroll suggestion lists in-panel
only so long prompts no longer push the page or pin tags at the bottom.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant