-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Provide a general summary of the issue here
Got warning in firefox
MouseEvent.mozInputSource is deprecated. Use PointerEvent.pointerType instead.
from isVirtualClick
react-spectrum/packages/@react-aria/utils/src/isVirtualEvent.ts
Lines 26 to 30 in 2ee02a0
export function isVirtualClick(event: MouseEvent | PointerEvent): boolean { | |
// JAWS/NVDA with Firefox. | |
if ((event as any).mozInputSource === 0 && event.isTrusted) { | |
return true; | |
} |
MDN doc
https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/mozInputSource
π€ Expected Behavior?
No warning in firefox
π― Current Behavior
Got warning in firefox
MouseEvent.mozInputSource is deprecated. Use PointerEvent.pointerType instead.
π Possible Solution
Replace usage mozInputSource with PointerEvent.pointerType
π¦ Context
No response
π₯οΈ Steps to Reproduce
- Open React Aria example in firefox https://codesandbox.io/s/react-aria-template-389r79
- Open console log
- Click in the Preview canvas
- See the warning show up in console
Version
main
What browsers are you seeing the problem on?
Firefox
If other, please specify.
No response
What operating system are you using?
macOS Sequoia
π§’ Your Company/Team
No response
π· Tracking Issue
No response
Metadata
Metadata
Assignees
Labels
No labels