mkhairi / materialize-sass

Materializecss rubygem for Rails Asset Pipeline / Sprockets
http://materialize.labs.my/
MIT License
806 stars 243 forks source link

[1.0.0.alpha1] Side nav doesn't work with turbolinks 5.0.1 #166

Closed guilpejon closed 6 years ago

guilpejon commented 6 years ago

I discovered this issue when I was trying to upgrade to materialize 1.0.0.alpha1, and I managed to create a sample app showing the issue.

You can find the sample app right here

To reproduce the error with the sample app do the following:

  1. Download the code and run rails s
  2. Click the menu icon on the left of the navbar to open the sidenav
  3. Click on any of the links on the sidenav
  4. Try to open the sidenav again by clicking the same icon from before
  5. The sidenav won't open again because the page refreshes each time you click the icon

If you comment out the //= require turbolinks from the application.js file, it works as expected.

mkhairi commented 6 years ago

https://github.com/Dogfalo/materialize/issues/5396