foundation / foundation-rails

Foundation for Rails
foundation.zurb.com
MIT License
1k stars 375 forks source link

orbit broken on 6.6.1.0, maybe by motion-ui #289

Closed rubydesign closed 3 years ago

rubydesign commented 4 years ago

With fresh rails new , and rails 5.2.4 followed instruction, added high_voltage, copied orbit example code as page, rendered with the foundation layout. Also added jquery-rails gem and jquery2 (or 3) as require in application.js (not mentioned in readme) Uncommented motion-ui in foundation_and_overrides.scss

Orbit example on foundation site works. But the local one only spins once, then stops. Ie slide 1,2,3,4 and then 1 show. Then all input is ignored and slide 1 stays stuck.

When i disable motion-ui, as shown in the docs (with data attribute), orbit works as expected. (But off course without transitions)

As a wild guess, i would say something in the packaging process is broken. How is difficult to say, as there is zero output.

But this leads to another question/issue i have been meaning to ask: is is possible to add/remove parts of the javascript, in a similar manner as the sass? If that were possible i could try and narrow it down.

I would gladly help in this as it critical to my foundation adoption. I just don't know how. Everything else looks very promising, i would hope this is just a small glitch.

rubydesign commented 4 years ago

While working on this more, i can now answer my second question. Js can be required in parts, for orbit like so :

//= require jquery2 //= require plugins/foundation.core //= require plugins/foundation.util.keyboard.js //= require plugins/foundation.util.motion.js //= require plugins/foundation.util.timer.js //= require plugins/foundation.util.imageLoader.js //= require plugins/foundation.util.touch.js

But i have checked the code on https://get.foundation/sites/docs/orbit.html asmuch as i know, and it "should" be the same as my local one. Alas, when i enable animations, it stops after a full round. Or when i go back!

Hints appreciated

drgcms commented 4 years ago

I can confirm the same (abnormal) behavior on Rails 6.

Reverted to 6.5.3.0 and it works as expected.

by TheR