Skip to content

Commit

Permalink
fix: Sidebar scrolling misclick issue on iOS (#32769)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchoeler authored and debdutdeb committed Jul 29, 2024
1 parent 2cc8644 commit 5253bcb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .changeset/red-vans-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

Fixed issue that caused unintentional clicks when scrolling the channels sidebar on safari/chrome in iOS
17 changes: 0 additions & 17 deletions apps/meteor/client/polyfills/hoverTouchClick.ts

This file was deleted.

1 change: 0 additions & 1 deletion apps/meteor/client/polyfills/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ import 'url-polyfill';
import './childNodeRemove';
import './cssVars';
import './customEventPolyfill';
import './hoverTouchClick';
import './promiseFinally';
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import React, { memo, useMemo } from 'react';

import { RoomIcon } from '../../components/RoomIcon';
import { roomCoordinator } from '../../lib/rooms/roomCoordinator';
import { isIOsDevice } from '../../lib/utils/isIOsDevice';
import { useOmnichannelPriorities } from '../../omnichannel/hooks/useOmnichannelPriorities';
import RoomMenu from '../RoomMenu';
import { OmnichannelBadges } from '../badges/OmnichannelBadges';
Expand Down Expand Up @@ -195,6 +196,7 @@ function SideBarItemTemplateWithData({
avatar={AvatarTemplate && <AvatarTemplate {...room} />}
actions={actions}
menu={
!isIOsDevice &&
!isAnonymous &&
(!isQueued || (isQueued && isPriorityEnabled)) &&
((): ReactElement => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import React, { memo, useMemo } from 'react';

import { RoomIcon } from '../../components/RoomIcon';
import { roomCoordinator } from '../../lib/rooms/roomCoordinator';
import { isIOsDevice } from '../../lib/utils/isIOsDevice';
import { useOmnichannelPriorities } from '../../omnichannel/hooks/useOmnichannelPriorities';
import RoomMenu from '../RoomMenu';
import { OmnichannelBadges } from '../badges/OmnichannelBadges';
Expand Down Expand Up @@ -195,6 +196,7 @@ const SideBarItemTemplateWithData = ({
avatar={AvatarTemplate && <AvatarTemplate {...room} />}
actions={actions}
menu={
!isIOsDevice &&
!isAnonymous &&
(!isQueued || (isQueued && isPriorityEnabled)) &&
((): ReactElement => (
Expand Down

0 comments on commit 5253bcb

Please sign in to comment.