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.

Button waves-effect doesn't return to original state by itself.

See original GitHub issue

“materialize-css”: “^0.97.7”, <button class="btn waves-effect waves-light" onclick="{updateRoles}" >Submit</button>

I am using this via webpack.

When I click the button the wave effect happens, and continual clicking makes my button whiter and whiter. It never returns to its original state. So now I am sitting here with a completely white button.

Oddly enough, if I move my mouse over and over on the button, it slowly comes back.

I wish I could repo those on codepen. My project is simple and build-able here and repos the issue. Any material button has the problem

https://github.com/ghstahl/riotjs-materializecss-webpack

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8

github_iconTop GitHub Comments

18reactions
ghstahlcommented, Sep 30, 2016

found my solution using this thread. https://github.com/Dogfalo/materialize/issues/2667

heneryville: You’ll get this behavior if you’ve included the materialize javascript more than once on the page.

I am using webpack and had this import import ‘./js/materialize.js’; in multiple places.

I only have it in my vendor.js file now and waves work properly.

3reactions
Jayanta227commented, Sep 9, 2020

thanks @ghstahl , i was facing same problem and i was using with react project. I imported the materialize.js like import M from ‘Materialize-css’; and also in the script tag using the cdn link.

after i removed the cdn link, it was working fine

Read more comments on GitHub >

github_iconTop Results From Across the Web

Button wave effect not resetting with angular2 Materialize
The ripple/wave effect from materialize play with a brighter color BUT it does not reset to the original color of the button.
Read more >
Creating Ripple Effect using React | by Dhilip Kumar | Medium
[Line 2] initializeState() function which returns an object thatwill be set to a state for the first time and whenever reset is required....
Read more >
Monostable Multivibrator - The One-shot Monostable
Monostable Multivibrators only return back to their first original and stable state after a period of time determined by the time constant of...
Read more >
Pressable - React Native
Pressable is a Core Component wrapper that can detect various stages of press interactions on any of its defined children.
Read more >
Franklin D. Roosevelt: Domestic Affairs | Miller Center
(Some scholars believe that a "Third New Deal" began in 1937 but never ... who had known FDR since their days in the...
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