Const
Position the popup so it's top edge is at the item's top edge, UNLESS it hits the top or bottom edges, in which case it'll shift the positioning, always keeping the top of the menu in view.
Position the popup so it's top edge is at the item's top edge, UNLESS it hits the top or bottom edges, in which case it'll shift the positioning, always keeping the top of the menu in view.