diff --git a/packages/design-system/src/composables/useDeviceSupport.test.ts b/packages/design-system/src/composables/useDeviceSupport.test.ts index 330b0ebb2f..d6974cb9eb 100644 --- a/packages/design-system/src/composables/useDeviceSupport.test.ts +++ b/packages/design-system/src/composables/useDeviceSupport.test.ts @@ -69,12 +69,5 @@ describe('useDeviceSupport()', () => { const event = new KeyboardEvent('keydown', { ctrlKey: true }); expect(isCtrlKeyPressed(event)).toEqual(true); }); - - it('should return true for touch device on MouseEvent', () => { - Object.defineProperty(window, 'ontouchstart', { value: {} }); - const { isCtrlKeyPressed } = useDeviceSupport(); - const mockEvent = new MouseEvent('click'); - expect(isCtrlKeyPressed(mockEvent)).toEqual(true); - }); }); }); diff --git a/packages/design-system/src/composables/useDeviceSupport.ts b/packages/design-system/src/composables/useDeviceSupport.ts index 01d52b890b..8ead46c140 100644 --- a/packages/design-system/src/composables/useDeviceSupport.ts +++ b/packages/design-system/src/composables/useDeviceSupport.ts @@ -12,9 +12,6 @@ export function useDeviceSupport() { const controlKeyCode = ref(isMacOs.value ? 'Meta' : 'Control'); function isCtrlKeyPressed(e: MouseEvent | KeyboardEvent): boolean { - if (isTouchDevice.value && e instanceof MouseEvent) { - return true; - } if (isMacOs.value) { return (e as KeyboardEvent).metaKey; }