mui / mui/material-ui

[material-ui][Card] Components get highlighted and retain highlight after swipe gesture on Android 13+ devices

Open
#39,767 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scope: card
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Duplicates
  • I have searched the existing issues
Latest version
  • I have tested the latest version
Steps to reproduce 🕹

Link to live example:
you can find minimal code example to reproduce the issue here

video:

https://github.com/mui/material-ui/assets/105718689/52cdc475-d6ce-43e1-be6b-58ca9a554d37

https://github.com/mui/material-ui/assets/105718689/a0086279-2e02-468e-a693-33cd59b89c44

Steps:

  1. I am using react js + material ui, we are using Capacitor to build the native applications
  2. My home page consists of the grid of cards, when I try to swipe back the cards get highlighted and retain the highlight even after the swipe gesture.
Current behavior 😯

cards get highlighted when the user is performing a gesture.

Expected behavior 🤔

cards should show the ripple animation only on the onClick event. It is working as expected on Android <=12 & iPhone.

Context 🔦

No response

Your environment 🌎
npx @mui/envinfo

  System:
    OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
  Binaries:
    Node: 18.17.0 - /usr/bin/node
    Yarn: Not Found
    npm: 10.2.0 - /usr/bin/npm
  Browsers:
    Chrome: 115.0.5790.170
  npmPackages:
    @emotion/react: ^11.11.1 => 11.11.1 
    @emotion/styled: ^11.11.0 => 11.11.0 
    @mui/base:  5.0.0-beta.21 
    @mui/core-downloads-tracker:  5.14.15 
    @mui/icons-material: ^5.14.16 => 5.14.15 
    @mui/lab: ^5.0.0-alpha.151 => 5.0.0-alpha.150 
    @mui/material: ^5.14.16 => 5.14.15 
    @mui/private-theming:  5.14.15 
    @mui/styled-engine:  5.14.15 
    @mui/system:  5.14.15 
    @mui/types:  7.2.7 
    @mui/utils:  5.14.15 
    @mui/x-date-pickers: ^6.17.0 => 6.17.0 
    @mui/x-tree-view:  6.0.0-alpha.1 
    @types/react: ^18.2.34 => 18.2.33 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    typescript: ^5.2.2 => 5.2.2 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked minimal Capacitor reproduction and inspect the Material UI Card ripple and highlight behavior during Android 13+ back-swipe gestures. Compare the behavior with Android 12 and iPhone, then verify that cards do not retain a highlight after the gesture while the expected click ripple still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.