diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ff7d609c7..3ab52bf5d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ - fix missing linebreaks in quotes #4360 - avoid showing wrong menu items for blocked users #4353 - fix: save message draft every 200ms if message text changed #3733 +- fix mac drag window issues #4300 diff --git a/packages/frontend/scss/_variables.scss b/packages/frontend/scss/_variables.scss index 53591610cd..247bf13c09 100644 --- a/packages/frontend/scss/_variables.scss +++ b/packages/frontend/scss/_variables.scss @@ -42,8 +42,7 @@ $z-index: ( account-hover-info: 200, // toast for errors and success messages - absolute-positioning-helper: 1000, - context-menu-layer: 9999 + absolute-positioning-helper: 1000 ); // setting z-index to 0 creates a new scope for children without changing the ordering of the parent element diff --git a/packages/frontend/scss/main_screen/_navbar_wrapper.scss b/packages/frontend/scss/main_screen/_navbar_wrapper.scss index 3601b85dc1..e7ec0c596b 100644 --- a/packages/frontend/scss/main_screen/_navbar_wrapper.scss +++ b/packages/frontend/scss/main_screen/_navbar_wrapper.scss @@ -1,7 +1,4 @@ .navbar-wrapper { - // so it can be used to drag the window around - -webkit-app-region: drag; - position: relative; .navbar-heading__button { @@ -54,8 +51,27 @@ } } +.drag { + // so it can be used to drag the window around + -webkit-app-region: drag; +} + .no-drag, -#hamburger-menu-button, -#chat-list-search { +input, +button { -webkit-app-region: no-drag; } + +#drag-area-visualisation { + background-color: transparent; + opacity: 0.5; + pointer-events: none; + position: absolute; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + margin: 0; + padding: 0; + border: 0; +} diff --git a/packages/frontend/scss/misc/_context_menu.scss b/packages/frontend/scss/misc/_context_menu.scss index a2571a0093..c754c91b55 100644 --- a/packages/frontend/scss/misc/_context_menu.scss +++ b/packages/frontend/scss/misc/_context_menu.scss @@ -8,7 +8,6 @@ max-height: unset; max-width: unset; // position: absolute; - // z-index: map-get($z-index, context-menu-layer); background-color: transparent; padding: 0; margin: 0; @@ -33,6 +32,7 @@ pointer-events: auto; background-color: var(--bgPrimary); color: var(--textPrimary); + -webkit-app-region: no-drag; border-radius: 3px; overflow: hidden; diff --git a/packages/frontend/src/components/Dialog/Dialog.tsx b/packages/frontend/src/components/Dialog/Dialog.tsx index 804db65a01..49ff414dc0 100644 --- a/packages/frontend/src/components/Dialog/Dialog.tsx +++ b/packages/frontend/src/components/Dialog/Dialog.tsx @@ -90,7 +90,7 @@ const Dialog = React.memo( onClose={onClose} onCancel={onCancel} ref={dialog} - className={classNames(styles.dialog, props.className, { + className={classNames(styles.dialog, props.className, 'no-drag', { [styles.unstyled]: unstyled, })} style={style} diff --git a/packages/frontend/src/components/Dialog/HeaderButton.tsx b/packages/frontend/src/components/Dialog/HeaderButton.tsx index 21a724cf12..d184278e0a 100644 --- a/packages/frontend/src/components/Dialog/HeaderButton.tsx +++ b/packages/frontend/src/components/Dialog/HeaderButton.tsx @@ -23,7 +23,10 @@ export default function HeaderButton({ ...props }: Props) { return ( -