Dialogs are blocking window controls (minimize/maximize/close)

Not a critical bug, just a user-experience annoyance.

Edit: I noticed that Microsoft Teams behaves exactly the same way as Obsidian

Steps to reproduce

  1. Open settings
  2. Open Appearance → Themes → Manage
    (You now have 2 dialogs on top of each other)
  3. Click one of the window control buttons (minimize, maximize, close)

Alternative steps:

  1. Press Ctrl+P for the command dialog
  2. Click one of the window control buttons

Expected result

  • Window control buttons to always work
  • Some examples from other electron apps:
    • In VS Code you are able to use window control buttons when you have the command or any other dialog open. The only exception is the [Help → About] dialog.
    • Spotify is a great example - Right click on one of your own playlists and choose “Edit details”, a dialog opens and UI interaction is disabled, except for the window controls and menu button.

Actual result

  • Clicking window control buttons close an opened dialog and window controls do not trigger until all dialogs are closed
    • Scenario 1: Obsidian window was too small and the settings dialog was hard to use, the user might want to maximize Obsidian, but now has to close the settings dialog to maximize and then open settings again.
    • Scenario 2: User had a browser open under the Obsidian window. To quickly google about some setting or theme, the user wants to minimize Obsidian to reveal the browser, but now has to close the dialogs first.
  • A div.modal-bg covers the whole app, including window controls.
    • Chromium 102 adds the inert HTML property which could be used to properly (but selectively) make UI elements inert while displaying dialogs. (wink, wink)
      HTMLElement.inert - Web APIs | MDN

Environment

  • Debug info:
    Obsidian version: v1.0.0
    Installer version: v1.0.0
    Operating system: Windows 10
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 5
    Restricted mode: on

Moved to FR