Skip to content

Commit d74651d

Browse files
committed
docs: clarify QWindow scroll positioning
1 parent f339a24 commit d74651d

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

  • packages/docs/src/markdown/developing

packages/docs/src/markdown/developing/faq.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,23 @@ you declared it.
5353

5454
:::
5555

56+
:::details Q. Should start positions include the page scroll offset?
57+
58+
It depends on the positioning mode.
59+
60+
By default, floating QWindow instances are viewport-relative. Treat `start-x` and `start-y` like
61+
coordinates inside the visible browser viewport, and do not add `window.scrollX` or `window.scrollY`
62+
when calculating those values.
63+
64+
When `scroll-with-window` is enabled, QWindow is document-relative. Use this mode when a helper
65+
window should stay connected to page content as the user scrolls. If you calculate the start position
66+
from an element's `getBoundingClientRect()`, add the current scroll offset in this mode.
67+
68+
If a floating window only appears after scrolling, update to a current QWindow version. Current
69+
versions initialize the scroll position before the first visible placement.
70+
71+
:::
72+
5673
:::details Q. Is QWindow SSR-safe?
5774

5875
The v3 component guards browser-only drag, resize, scroll, and Teleport setup so server rendering does

0 commit comments

Comments
 (0)