About dialog no longer modal after expanding #3337

Closed
opened 2026-01-30 23:18:59 +00:00 by claunia · 13 comments
Owner

Originally created by @drryder on GitHub (Aug 10, 2019).

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.239]
Windows Terminal version: Version: 0.3.2171.0

Steps to reproduce

  • Open the about window
  • Increase the width of the terminal window (it helps to start with a smaller terminal window to have room for this step)

Expected behavior

  • The about dialog should remain modal -- the window under the about dialog should not allow me to click the new tab / minimize / maximize / close buttons.

Actual behavior

  • The about dialog only disables a rectangle based on the original window size. This can lead to behavior where the user opens a new tab and regains focus onto the terminal.
Originally created by @drryder on GitHub (Aug 10, 2019). # Environment ``` Windows build number: Microsoft Windows [Version 10.0.18362.239] Windows Terminal version: Version: 0.3.2171.0 ``` # Steps to reproduce - Open the about window - Increase the width of the terminal window (it helps to start with a smaller terminal window to have room for this step) # Expected behavior - The about dialog should remain modal -- the window under the about dialog should not allow me to click the new tab / minimize / maximize / close buttons. # Actual behavior - The about dialog only disables a rectangle based on the original window size. This can lead to behavior where the user opens a new tab and regains focus onto the terminal.
Author
Owner

@drryder commented on GitHub (Aug 10, 2019):

A closely related issue: when the about dialog is created in a window that is vertically small, the dialog becomes uncloseable.

@drryder commented on GitHub (Aug 10, 2019): A closely related issue: when the about dialog is created in a window that is vertically small, the dialog becomes uncloseable.
Author
Owner

@DHowett-MSFT commented on GitHub (Aug 12, 2019):

We should definitely not be doing that. Thanks!

@DHowett-MSFT commented on GitHub (Aug 12, 2019): We should definitely not be doing that. Thanks!
Author
Owner

@skyline75489 commented on GitHub (Oct 29, 2019):

The not-being-modal behaviour of a dialog seems to be the correct one. Dialogs in XAML Controls Gallery app behave just like that. But the resizing is definitely not correct. In gallery app a dialog will be repositioned as the parent window is resizing. However with XAML island this is broken.

@skyline75489 commented on GitHub (Oct 29, 2019): The not-being-modal behaviour of a dialog seems to be the *correct* one. Dialogs in [XAML Controls Gallery app](https://www.microsoft.com/store/productId/9MSVH128X2ZT) behave just like that. But the resizing is definitely not correct. In gallery app a dialog will be repositioned as the parent window is resizing. However with XAML island this is broken.
Author
Owner

@mkitzan commented on GitHub (Nov 24, 2019):

This issue also applies to the "Close All Tabs" dialog box.
bad-xaml-root

@mkitzan commented on GitHub (Nov 24, 2019): This issue also applies to the "Close All Tabs" dialog box. <img width="854" alt="bad-xaml-root" src="https://user-images.githubusercontent.com/28279285/69504326-aad38300-0ed6-11ea-8dbd-3b8cc41b28fa.PNG">
Author
Owner

@mkitzan commented on GitHub (Nov 25, 2019):

These ContentDialog pages are rendered using _showDialogHandlers WinRT macro. The call seems to render the page once, and it takes the ContentDialog object (local variable) by value so it's lost once the function returns. I found a hacky way to fix this by storing the ContentDialog object as a data member of TerminalPage and re-rendering it when the size change handler executes. There's probably a better way, but I don't understand the _showDialogHandlers macro enough.
re-render-dialog

@mkitzan commented on GitHub (Nov 25, 2019): These `ContentDialog` pages are rendered using [`_showDialogHandlers`](https://github.com/microsoft/terminal/blob/master/src/cascadia/TerminalApp/TerminalPage.cpp#L207) WinRT macro. The call seems to render the page once, and it takes the `ContentDialog` object (local variable) by value so it's lost once the function returns. I found a hacky way to fix this by storing the `ContentDialog` object as a data member of `TerminalPage` and re-rendering it when the [size change handler](https://github.com/microsoft/terminal/blob/master/src/cascadia/TerminalApp/TerminalPage.cpp#L1294) executes. There's probably a better way, but I don't understand the `_showDialogHandlers` macro enough. <img width="538" alt="re-render-dialog" src="https://user-images.githubusercontent.com/28279285/69590725-416e7580-0fa5-11ea-988e-730dab7d102a.PNG">
Author
Owner

@skyline75489 commented on GitHub (Nov 26, 2019):

Recently the UWP target is added. I've tried it on my PC and the behaviour is the same as XAML Controls Gallery app. Perhaps the UWP environment is the key here.

@skyline75489 commented on GitHub (Nov 26, 2019): Recently the UWP target is added. I've tried it on my PC and the behaviour is the same as [XAML Controls Gallery app](https://www.microsoft.com/store/productId/9MSVH128X2ZT). Perhaps the UWP environment is the key here.
Author
Owner

@DHowett-MSFT commented on GitHub (Nov 26, 2019):

To make titlebar dragging work properly outside of the UWP environment (where we can actually launch processes with the right permissions), we have to literally cut a hole in the XAML Island hosting the UI. It's pretty crazy. 😄

Just FYI: the universal terminal target is not going to be broadly useful to anyone, and bugs reported against it will likely be closed without any message beyond the thing I just said. Really appreciate your interest though!

@DHowett-MSFT commented on GitHub (Nov 26, 2019): To make titlebar dragging work properly _outside_ of the UWP environment (where we can actually launch processes with the right permissions), we have to literally cut a hole in the XAML Island hosting the UI. It's pretty crazy. :smile: Just FYI: the universal terminal target is not going to be broadly useful to anyone, and bugs reported against it will likely be closed without any message beyond the thing I just said. Really appreciate your interest though!
Author
Owner

@Poopooracoocoo commented on GitHub (Jun 15, 2020):

and it gets real choppy when you're resizing the window when the about dialog is open

@Poopooracoocoo commented on GitHub (Jun 15, 2020): and it gets real choppy when you're resizing the window when the about dialog is open
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Aug 13, 2020):

I see this effect if I open the About dialog box, close the dialog box, resize the terminal window to larger, and finally open the About dialog box again. That is, the size of the window seems to be saved when the dialog box is first shown. This happens in Windows Terminal 1.1.2021.0 and Windows Terminal Preview 1.2.2022.0, each with its default settings.json. In Windows Terminal Preview, it affects the multiline paste warning dialog box https://github.com/microsoft/terminal/issues/2349 as well, although that one seems to save the size separately, instead of using the size saved by the About dialog box. I guess that's because it is a different ContentDialog instance.

I wonder whether ContentDialog would discard the previously saved size of the window if it were temporarily removed from the Panel.Children collection of the Grid and then added back.

@KalleOlaviNiemitalo commented on GitHub (Aug 13, 2020): I see this effect if I open the About dialog box, close the dialog box, resize the terminal window to larger, and finally open the About dialog box again. That is, the size of the window seems to be saved when the dialog box is first shown. This happens in Windows Terminal 1.1.2021.0 and Windows Terminal Preview 1.2.2022.0, each with its default settings.json. In Windows Terminal Preview, it affects the multiline paste warning dialog box <https://github.com/microsoft/terminal/issues/2349> as well, although that one seems to save the size separately, instead of using the size saved by the About dialog box. I guess that's because it is a different ContentDialog instance. I wonder whether ContentDialog would discard the previously saved size of the window if it were temporarily removed from the Panel.Children collection of the Grid and then added back.
Author
Owner

@sylveon commented on GitHub (Nov 11, 2020):

This is a bug affecting every XAML islands-based app, see https://github.com/microsoft/microsoft-ui-xaml/issues/3577

image

@sylveon commented on GitHub (Nov 11, 2020): This is a bug affecting every XAML islands-based app, see https://github.com/microsoft/microsoft-ui-xaml/issues/3577 ![image](https://user-images.githubusercontent.com/6440374/98770697-cf0ec500-23b0-11eb-9925-ebc50c93104d.png)
Author
Owner

@DHowett commented on GitHub (Nov 12, 2020):

thank you. It's such a pain to set up an isolated XAML Island reproducer that I rarely do.

/dup https://github.com/microsoft/microsoft-ui-xaml/issues/3577

@DHowett commented on GitHub (Nov 12, 2020): _thank you_. It's such a pain to set up an isolated XAML Island reproducer that I rarely do. /dup https://github.com/microsoft/microsoft-ui-xaml/issues/3577
Author
Owner

@ghost commented on GitHub (Nov 12, 2020):

Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!

@ghost commented on GitHub (Nov 12, 2020): Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!
Author
Owner

@DHowett commented on GitHub (Nov 12, 2020):

It may be possible for us to "jiggle it" until it works, but it's a hack around a small problem that doesn't make anybody too upset, so I'd err on the side of ignoring it until the framework improves. 😄

maintainer edit, circa august 2022: This doesn't meet the bar to be fixed in WinUI 2. This will never be fixed in Terminal until we can move to WinUI 3.

@DHowett commented on GitHub (Nov 12, 2020): It may be possible for us to "jiggle it" until it works, but it's a hack around a small problem that doesn't make anybody too upset, so I'd err on the side of ignoring it until the framework improves. :smile: _maintainer edit, circa august 2022:_ This doesn't meet the bar to be fixed in WinUI 2. This will never be fixed in Terminal until we can move to WinUI 3.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3337