Improve selectors for macos app draggable regions (#1170)

Disable background drag handles when modals are open as they interfere through the modal body
This commit is contained in:
Michael Telatynski 2023-08-17 05:20:58 +01:00 committed by GitHub
parent 47e98c55b2
commit 0da5ec88d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,18 +81,24 @@ export function setupMacosTitleBar(window: BrowserWindow): void {
-webkit-app-region: drag;
-webkit-user-select: none;
}
.mx_ImageView_panel {
-webkit-app-region: drag;
}
/* Exclude header interactive elements from being drag handles */
.mx_RoomHeader .mx_DecoratedRoomAvatar,
.mx_RoomHeader_name,
.mx_LegacyRoomHeader .mx_LegacyRoomHeader_avatar,
.mx_LegacyRoomHeader .mx_E2EIcon,
.mx_LegacyRoomHeader .mx_RoomTopic,
.mx_LegacyRoomHeader .mx_AccessibleButton {
.mx_LegacyRoomHeader .mx_AccessibleButton,
.mx_ImageView_panel > .mx_ImageView_info_wrapper,
.mx_ImageView_panel > .mx_ImageView_title,
.mx_ImageView_panel > .mx_ImageView_toolbar > * {
-webkit-app-region: no-drag;
}
/* Mark the background as a drag handle */
.mx_RoomView_wrapper {
/* Mark the background as a drag handle only if no modal is open */
.mx_MatrixChat_wrapper[aria-hidden="false"] .mx_RoomView_wrapper {
-webkit-app-region: drag;
}
/* Exclude content elements from being drag handles */