Menu opens in the up direction #12242

Closed
opened 2026-01-31 03:10:07 +00:00 by claunia · 14 comments
Owner

Originally created by @hwti on GitHub (Jan 28, 2021).

Environment

Windows build number: 10.0.19042.746
Windows Terminal version : 1.6.10272.0

Steps to reproduce

With the Terminal window NOT near the top of the screen, open the menu by clicking on the down arrow icon.

Expected behavior

The menu opens in the down direction (unless the window is really near the bottom of the screen).

Actual behavior

With the 1.6 preview, the menu opens in the up direction (1.5 preview was OK).
image

Originally created by @hwti on GitHub (Jan 28, 2021). # Environment ```none Windows build number: 10.0.19042.746 Windows Terminal version : 1.6.10272.0 ``` # Steps to reproduce With the Terminal window NOT near the top of the screen, open the menu by clicking on the down arrow icon. # Expected behavior The menu opens in the down direction (unless the window is really near the bottom of the screen). # Actual behavior With the 1.6 preview, the menu opens in the up direction (1.5 preview was OK). ![image](https://user-images.githubusercontent.com/827856/106182038-9c4dbf00-619e-11eb-8456-0f827cc98b2a.png)
Author
Owner

@DHowett commented on GitHub (Jan 28, 2021):

Menus open in whatever direction they best fit. This is true all over Windows.

@DHowett commented on GitHub (Jan 28, 2021): Menus open in whatever direction they best fit. This is true all over Windows.
Author
Owner

@hwti commented on GitHub (Jan 28, 2021):

1.5 was best fit, this is not.

This seems to prefer the up direction by default (when the menu has the space to open in both directions), and only open in down direction when there is no space above the window.

@hwti commented on GitHub (Jan 28, 2021): 1.5 was best fit, this is not. This seems to prefer the up direction by default (when the menu has the space to open in both directions), and only open in down direction when there is no space above the window.
Author
Owner

@DHowett commented on GitHub (Jan 28, 2021):

It looks like you have a different set of key bindings in your menu in 1.6 (which was a bug fix. your personal bindings were hidden, and now they are not), which changed the size of the menu items. (edit: unless this is just because of the AZERTY keyboard)

@DHowett commented on GitHub (Jan 28, 2021): It looks like you have a different set of key bindings in your menu in 1.6 (which was a bug fix. your personal bindings were hidden, and now they are not), which changed the size of the menu items. (edit: unless this is just because of the AZERTY keyboard)
Author
Owner

@zadjii-msft commented on GitHub (Jan 28, 2021):

This looks related: https://github.com/microsoft/microsoft-ui-xaml/pull/2806

@zadjii-msft commented on GitHub (Jan 28, 2021): This looks related: https://github.com/microsoft/microsoft-ui-xaml/pull/2806
Author
Owner

@hwti commented on GitHub (Jan 28, 2021):

This is AZERTY, so profile Ctrl+Shift+& and tab switch ctrl+alt+1 use the same final key, but described in a different way.

But this is probably off-topic, I don't see how the menu direction would be affected by the key bindings, which would only change its width.

@hwti commented on GitHub (Jan 28, 2021): This is AZERTY, so profile `Ctrl+Shift+&` and tab switch `ctrl+alt+1` use the same final key, but described in a different way. But this is probably off-topic, I don't see how the menu direction would be affected by the key bindings, which would only change its width.
Author
Owner

@hwti commented on GitHub (Jan 28, 2021):

This looks related: microsoft/microsoft-ui-xaml#2806

So maybe TerminalPage::_CreateNewTabFlyout should set the placement.
But I wonder why Auto would prefer the up direction. The tab context menu doesn't have the issue.

Btw, when using the key binding (ctrl+shift+space), the menu opens in the down direction :
ae8347f336/src/cascadia/TerminalApp/TerminalPage.cpp (L669)

@hwti commented on GitHub (Jan 28, 2021): > > > This looks related: [microsoft/microsoft-ui-xaml#2806](https://github.com/microsoft/microsoft-ui-xaml/pull/2806) So maybe `TerminalPage::_CreateNewTabFlyout` should set the placement. But I wonder why `Auto` would prefer the up direction. The tab context menu doesn't have the issue. Btw, when using the key binding (ctrl+shift+space), the menu opens in the down direction : https://github.com/microsoft/terminal/blob/ae8347f336d308997e40e8a46e7d2053c88a1dd1/src/cascadia/TerminalApp/TerminalPage.cpp#L669
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Jan 29, 2021):

The chevron in the menu button always points down. Can you make it point up if the menu is going to open upwards?

@KalleOlaviNiemitalo commented on GitHub (Jan 29, 2021): The chevron in the menu button always points down. Can you make it point up if the menu is going to open upwards?
Author
Owner

@DHowett commented on GitHub (Jan 29, 2021):

I’m not sure we can know that before the OS chooses where to put the menu.

@DHowett commented on GitHub (Jan 29, 2021): I’m not sure we can know that before the OS chooses where to put the menu.
Author
Owner

@hwti commented on GitHub (Jan 29, 2021):

But why the OS chooses to open the menu up if there is enough space down ?

@hwti commented on GitHub (Jan 29, 2021): But why the OS chooses to open the menu up if there is enough space down ?
Author
Owner

@zadjii-msft commented on GitHub (Jan 29, 2021):

But why the OS chooses to open the menu up if there is enough space down ?

Honestly, we have no idea. The folks at https://github.com/microsoft/microsoft-ui-xaml would be the ones to ask. We're just using the control they built.

@zadjii-msft commented on GitHub (Jan 29, 2021): > But why the OS chooses to open the menu up if there is enough space down ? Honestly, we have no idea. The folks at https://github.com/microsoft/microsoft-ui-xaml would be the ones to ask. We're just using the control they built.
Author
Owner

@hwti commented on GitHub (Jan 29, 2021):

Btw, the key binding uses BottomEdgeAlignedLeft, and does what expected : the menu opens down, unless there isn't enough space.

@hwti commented on GitHub (Jan 29, 2021): Btw, the key binding uses `BottomEdgeAlignedLeft`, and does what expected : the menu opens down, unless there isn't enough space.
Author
Owner

@thijsputman commented on GitHub (Jan 29, 2021):

Btw, the key binding uses BottomEdgeAlignedLeft, and does what expected : the menu opens down, unless there isn't enough space.

In other words, compare this (clicked on the arrow):

With this (Ctrl+Shift+space):

Edit – and this (Ctrl+Shift+space at the bottom of the screen):

@thijsputman commented on GitHub (Jan 29, 2021): > > > Btw, the key binding uses `BottomEdgeAlignedLeft`, and does what expected : the menu opens down, unless there isn't enough space. In other words, compare this (clicked on the arrow): <img src="https://user-images.githubusercontent.com/4418373/106313474-8e647080-6268-11eb-80ba-f6cc65bc6fd1.png" width="480"> With this (`Ctrl`+`Shift`+`space`): <img src="https://user-images.githubusercontent.com/4418373/106313528-a936e500-6268-11eb-9dc0-5e7dc9c48ed7.png" width="480"> Edit – and this (`Ctrl`+`Shift`+`space` at the bottom of the screen): <img src="https://user-images.githubusercontent.com/4418373/106313865-2d896800-6269-11eb-9c1a-7b6d361aff0f.png" width="480">
Author
Owner

@ghost commented on GitHub (May 25, 2021):

:tada:This issue was addressed in #10009, which has now been successfully released as Windows Terminal v1.8.1444.0.🎉

Handy links:

@ghost commented on GitHub (May 25, 2021): :tada:This issue was addressed in #10009, which has now been successfully released as `Windows Terminal v1.8.1444.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.8.1444.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (May 25, 2021):

:tada:This issue was addressed in #10009, which has now been successfully released as Windows Terminal Preview v1.9.1445.0.🎉

Handy links:

@ghost commented on GitHub (May 25, 2021): :tada:This issue was addressed in #10009, which has now been successfully released as `Windows Terminal Preview v1.9.1445.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.9.1445.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12242