Skip to content

Issue 395 Ticket Flyouts Ran Off The Bottom

Ed Mozley edited this page Nov 19, 2026 · 1 revision

πŸ–±οΈ #395 Ticket right-click flyouts ran off the bottom of the window

GitHub #395, reported and fixed by @cloudcogsio Β· Tickets Β· fixed in 5.7.0 (#3004)

What you saw

In Tickets, right-click a ticket low in the list and hover a flyout - Set type, Assign to, Move to company. The flyout opened downward from its row and ran past the bottom of the window: the entries below the edge could not be seen or clicked, and the bottom of its own scrollbar was off the page too, so scrolling inside it did not reach them.

What was wrong

A flyout (.ticket-context-submenu, assets/css/inbox.css) sits beside its row at top: -5px with max-height: 320px, so it always runs downward. openTicketContextMenu() kept the menu inside the window and flipped flyouts left near the right edge, but nothing did the same at the bottom. And because a tall menu is moved up to fit, its lower rows - Assign to, Move to company - end up near the bottom whichever ticket was right-clicked.

The fix

@cloudcogsio sent the fix on a branch; it is merged with his authorship. fitTicketContextSubmenu() (assets/js/inbox.js) runs each time a flyout opens, by hover or keyboard focus:

sub.style.maxHeight = Math.min(cssMax, window.innerHeight - 2 * MARGIN) + 'px';   // never taller than the window
const over = r.bottom - (window.innerHeight - MARGIN);
if (over > 0) sub.style.top = (Math.max(MARGIN, r.top - over) - parent.getBoundingClientRect().top) + 'px';   // slide up until it fits

It measures every time because the menu's position and the flyout's length change from one right-click to the next. The phone's bottom sheet is untouched.

πŸ“ Files

File Change
🟑 assets/js/inbox.js fitTicketContextSubmenu() and its hover / focus listeners
βšͺ tickets/index.php inbox.js?v=214

How it was verified

Reproduced first on a test install, right-clicking the lowest ticket in a 520px-tall window, old code: Set type ran 135px past the bottom, Assign to 199px, Assign to team 15px. With the fix, every flyout ended inside the window at 320, 520 and 700px; at 320px Assign to (10 entries) was capped at the window's height and scrolled.

What this means for you

Update to 5.7.0 and hard-refresh (Ctrl-F5). Every entry in every flyout can be reached, wherever you right-click.

Related: Tickets Β· Inbox JS - Developer Guide

FreeITSM

Getting Started

Modules

Multi-tenancy (planned)

Responses to feedback

Blue sky thinking

Bugs resolved

Pull requests

Links

Clone this wiki locally