question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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>

Example here

Steps to Reproduce (for bugs)

  1. Create a button with an image inside of it
  2. Click on the button
  3. Before releasing the mouse click and drag (Chrome will display the dragged image icon)
  4. Release the mouse, the ripple effect remains.
  5. 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
mbrookescommented, Jun 4, 2018

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found