Terminal: About dialog no longer modal after expanding

Created on 10 Aug 2019  路  13Comments  路  Source: microsoft/terminal

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.
Area-User Interface Help Wanted Issue-Bug Priority-3 Product-Terminal Resolution-External v1-Scrubbed

Most helpful comment

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

image

All 13 comments

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

We should definitely not be doing that. Thanks!

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.

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

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

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.

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!

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

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.

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

image

_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

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!

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:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghvanderweg picture ghvanderweg  路  3Comments

mdtauk picture mdtauk  路  3Comments

wkbrd picture wkbrd  路  3Comments

carlos-zamora picture carlos-zamora  路  3Comments

dev-logan picture dev-logan  路  3Comments