Skip to content

mozInputSource is deprecatedΒ #8674

@yilinjuang

Description

@yilinjuang

Provide a general summary of the issue here

Got warning in firefox

MouseEvent.mozInputSource is deprecated. Use PointerEvent.pointerType instead.

from isVirtualClick

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

  1. Open React Aria example in firefox https://codesandbox.io/s/react-aria-template-389r79
  2. Open console log
  3. Click in the Preview canvas
  4. 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions