Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore macOs room header dragability #1136

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/macos-titlebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,17 @@ export function setupMacosTitleBar(window: BrowserWindow): void {
}

/* Mark the header as a drag handle */
.mx_LegacyRoomHeader,
.mx_RoomHeader {
-webkit-app-region: drag;
-webkit-user-select: none;
}
/* Exclude header interactive elements from being drag handles */
.mx_RoomHeader .mx_RoomHeader_avatar,
.mx_RoomHeader .mx_E2EIcon,
.mx_RoomHeader .mx_RoomTopic,
.mx_RoomHeader .mx_AccessibleButton {
.mx_RoomHeader .mx_DecoratedRoomAvatar,
Copy link
Member

@t3chguy t3chguy Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text container for the room name in the room header should also be no-drag, like it is on legacy (its within the Accessible Button)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure it needs to be like that.
The new room header is not interactive the same way the old one way, therefore we can allow drag from that element.

In the spirit of moving that pull request forward i've pushed that change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd mean you can't highlight the text which is not good for accessibility

.mx_LegacyRoomHeader .mx_LegacyRoomHeader_avatar,
.mx_LegacyRoomHeader .mx_E2EIcon,
.mx_LegacyRoomHeader .mx_RoomTopic,
.mx_LegacyRoomHeader .mx_AccessibleButton {
-webkit-app-region: no-drag;
}

Expand Down