[ButtonBase] Ripple Effect is duplicated when dragging an image
See original GitHub issue- This is a v1.x issue (v0.x is no longer maintained).
- I have searched the issues of this repository and believe that this is not a duplicate. (The issue seems similar to #7537)
Expected Behavior
After the mouse click has released and the animation completed the ripple effect should dissapear.
Current Behavior
Currently if a Button exists with an Image inside of it, clicking and moving the mouse causes the image to be selected. On Chrome (both Firefox and Microsoft Edge do not have this behavior) based browsers this is preventing the ripple from being removed afterwards. If this is done only once this only slightly highlights the button and is removed after another click. However, if multiple drags are done on the same button all but the last ripple remain indefinitely.
In my application this is the code that produces this error.
<ButtonBase>
<img
src='https://i.ytimg.com/vi/GRnALgoI8-4/hqdefault.jpg'/>
</ButtonBase>
Steps to Reproduce (for bugs)
- Create a button with an image inside of it
- Click on the button
- Before releasing the mouse click and drag (Chrome will display the dragged image icon)
- Release the mouse, the ripple effect remains.
- Repeat 2-4 to make the effect deeper.
Your Environment
Tech | Version |
---|---|
Material-UI | v1.2.0 |
React | v16.2.0 |
browser | Vivaldi 1.10.867.38 and Google Chrome 66.0.3359.181 |
etc | Windows 10 64bit, build 17134.48 |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top Results From Across the Web
[ButtonBase] Ripple Effect is duplicated when dragging an ...
Currently if a Button exists with an Image inside of it, clicking and moving the mouse causes the image to be selected. On...
Read more >How to add ripple effect when clicking Card in MUI
I noticed that TouchRipple has been moved out of the internal directory. It's now available in the ButtonBase folder.
Read more >material-ui/core/CHANGELOG.md - UNPKG
571, - [Popper] Remove duplicate handleOpen call from effect (#21106) @ ... 773, - [ButtonBase] Fix ripple size when clientX or clientY is...
Read more >@mui/styled-engine | Yarn - Package Manager
This package is a wrapper around the @emotion/react package. It also provides a shared interface that can be used with other styled engines,...
Read more >ButtonBase API - Material UI - MUI
Name Type Default
action ref
centerRipple bool false
children node
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@runewake2 Try a few small click-drags within the ButtonBase one after the next. Then, each time you mouseover, one layer of ripple will be removed.
A solution was found in https://github.com/mui-org/material-ui/issues/15937#issuecomment-499848759.