Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #8183: Allow menu to be presented properly in compact-width iPads
Browse files Browse the repository at this point in the history
Unfortunately PanModal enforces the presentation to a `popover` on iPads regardless of size classes, so we must allow the arrow direction to be `down` as well here since the toolbar will be at the bottom on compact-width size classes. This also means that on iPads even with iPhone layouts they get shown as a popover which is not ideal and should be fixed later.
  • Loading branch information
kylehickinson committed Oct 3, 2023
1 parent 952bcaf commit 401304e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ extension BrowserViewController: ToolbarDelegate {
presentPanModal(menuController, sourceView: tabToolbar.menuButton, sourceRect: tabToolbar.menuButton.bounds)
if menuController.modalPresentationStyle == .popover {
menuController.popoverPresentationController?.popoverLayoutMargins = .init(equalInset: 4)
menuController.popoverPresentationController?.permittedArrowDirections = [.up]
menuController.popoverPresentationController?.permittedArrowDirections = [.up, .down]
}
}

Expand Down

0 comments on commit 401304e

Please sign in to comment.