Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Card] The Highlighting of card component on back gesture on Android 13 device #44803

Closed
vasimpathan22 opened this issue Dec 18, 2024 · 8 comments
Assignees
Labels
component: card This is the name of the generic UI component, not the React module! external dependency Blocked by external dependency, we can’t do anything about it

Comments

@vasimpathan22
Copy link

vasimpathan22 commented Dec 18, 2024

Steps to reproduce

Steps:

  1. Open this link to live example: (https://github.com/vasimpathan22/react-mui-cap-poc)
  2. Refer Readme file of code to reproduce the issue
  3. use Android 13 emulator or physical device
mui-card-issue.mp4

to produce the issue

Current behavior

The card is getting highlighted with the black color gradually and its also retaining that color even after opening the app

Expected behavior

the card should not be get highlighted

Context

So basically i am using the material ui ,react and capacitor to develop the native application in which i have used the card components of mui where i have seen that at some stage while performing the back gesture on this card the card is getting highlighted and also it is retaining the state of the card, This issue only arising on Android 13 devices specially. The respective video is attached.

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: CardActionArea,Mui

@vasimpathan22 vasimpathan22 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 18, 2024
@mnajdova mnajdova added the component: card This is the name of the generic UI component, not the React module! label Dec 18, 2024
@mnajdova
Copy link
Member

I don't think this is specific to the card component, seem like some state persists on the app level when it shouldn't. Where does the grey background come from?

@mnajdova mnajdova removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 18, 2024
@vasimpathan22
Copy link
Author

On clicking the card there is ripple effect which is of light gray color but dont know how the effect is activating even though i am not clicking the card component while going back with the help of gesture

@DiegoAndai
Copy link
Member

Hey @vasimpathan22, thanks for the report.

If this isn't reproducible with Android 14 or 15, it looks to me like there was a bug in Android 13 that was fixed.

Have you tried using disableRipple={true} on CardActionArea?

@DiegoAndai DiegoAndai self-assigned this Dec 19, 2024
@DiegoAndai DiegoAndai added external dependency Blocked by external dependency, we can’t do anything about it status: waiting for author Issue with insufficient information labels Dec 19, 2024
@vasimpathan22
Copy link
Author

Using disableRipple={true} it is working but the Ripple effect should be only shown when the card is clicked, also that effect is accumulating on card while using gesture.
And after using disable ripple how can i add that effect on the card is there any alternative way

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Dec 19, 2024
@DiegoAndai
Copy link
Member

And after using disable ripple how can i add that effect on the card is there any alternative way

Sadly not, the workaround I proposed is removing the ripple, which I though was going to remove the accumulating grid gray overlay. It didn't?

As I mentioned, this looks like a bug in Android 13's side. May I ask you to search for any similar issues reported on their repo? I don't think there's anything we can do on our side.

@DiegoAndai DiegoAndai added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Dec 19, 2024
@vasimpathan22
Copy link
Author

After using disable ripple there is no any gray overlay accumulating I will check if any issue had been raised on their repo

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Dec 19, 2024
@mj12albert mj12albert changed the title [MUI] [Card-component] The Highlighting of card component on back gesture on Android 13 device [Card] The Highlighting of card component on back gesture on Android 13 device Dec 20, 2024
@DiegoAndai DiegoAndai removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 20, 2024
@DiegoAndai
Copy link
Member

I'm tentatively closing as the bug has been fixed in the latest Android versions, and the workaround for Android 13 is disabling the ripple. @vasimpathan22, feel free to reopen if you have new evidence pointing to an issue on the Material UI side.

Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@vasimpathan22 How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: card This is the name of the generic UI component, not the React module! external dependency Blocked by external dependency, we can’t do anything about it
Projects
None yet
Development

No branches or pull requests

3 participants