Candidate windows must flip with the caret's distance to the screen edge
Aliases: candidate flip · edge flip · caret anchoring
What it is
When the caret is near the bottom of the screen or window, a candidate window that always opens downward is clipped to half a row of words. The right move is to measure remaining space to each edge and flip toward the side with more room—usually upward, translating horizontally if needed. Flipping is geometry: the same candidates, the same composition, a different anchor only because the caret neared an edge. Not flipping means the list cannot be seen in full on edge rows.
Why it happens
Floating windows have a preferred direction (often down, with reading). Remaining height = window bottom − caret y − margin. If that is less than the candidate window needs, continuing down exits the screen or is clipped by the taskbar. Flipping up uses the caret as a bottom anchor and opens toward prior text, which may cover the previous line but at least shows the full list. Multiple displays and scaling make “screen edge” and “current window edge” disagree; compute against the actual usable work area, not the virtual desktop. If flipping is not recomputed when the caret wraps mid-composition, half the window stays on the old line.
Studying it
Place the caret at window center, bottom edge, top edge, and lower-right corner; record whether the candidate window is complete, whether it leaves the work area, and which line it covers after a flip. Test high-DPI and external displays separately. Automation can assert window rectangle ⊆ work area. The user task is composing on the last line of a document, where flips concentrate; typing in the middle of a blank page misses them.
Where it stops holding
Candidates docked on a soft keyboard have no off-screen flip; the keyboard is the bottom edge. Extremely tall lists (dozens of rows) fit neither side; flipping cannot help, only internal scrolling. VM or remote-desktop work areas are remote resolution; a local flip algorithm will mis-compute. In split view the edge is the sash, not the display bezel.
Applying it
- Before each candidate show, compute remaining space in four directions inside the work area, pick a direction that fits fully, and keep proximity to the caret as a secondary preference.
- Recompute when the caret wraps or the view scrolls; do not reuse the composition-start anchor.
- Keep flip animation short so it is not still moving when the user picks.
- Verify maximized and restored target windows, caret on the last line and the first, that the list is fully visible and its rectangle stays inside the work area.
Related
- Same group: C6.27.1 Candidate lists usually float near the caret and easily cover the text being edited · C6.27.3 A candidate window that covers controls below the field blocks what comes next · C6.27.4 Dismiss timing must be consistent, or leftover overlays remain
- Adjacent: C6.06 Soft keyboards and screen occupancy · C6.13 Text selection and caret placement
- Search:
flip popup·edge collision·IME window position