Skip to content

bug([MatCheckbox]): MatCheckbox doesn't check on mobile in certain conditions #19466

Closed
@KyleAlanDavis

Description

@KyleAlanDavis

Reproduction

Resubmitting #17146, as noted on that issue.

I am not able to reproduce this on stackblitz, only in my current project.

When the viewing the page in mobile, clicking on the checkboxes causes the ripple effect on the background but does not check the checkbox. The regular html checkbox below it is able to be checked just fine.

Inspection of the event is showing that the event.isTrusted = false. I think that is the issue, but have no idea how it is happening.

To see the issue on a mobile device:

  1. Open https://test.aryv.com/checkbox-test or https://aryv.com/checkbox-test (US only)
  2. Click on the checkbox

To see the issue on Windows Chrome:

  1. Open dev tools and set the tab to a mobile device.
  2. Open https://test.aryv.com/checkbox-test or https://aryv.com/checkbox-test (US only) The tab must be in a mobile view before loading the page to see the issue or you can reload the page after setting it to mobile view.
  3. Click the checkbox

Expected Behavior

The checkbox should be checked.

Actual Behavior

The ripple effect displays but the checkbox is not checked.

Environment

Since the last report, our project has been upgraded to v9.

  • Angular: 7.2.8, 8.2.7, 9.1.0
  • CDK/Material: 7.2, 8.2, 9.2
  • Browser(s): Chrome, iOS Safari
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows, Android, iOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions