Comments (3)
Demo App:
https://github.com/asecondwill/demosliders
from foundation-rails.
I found the issue was that I was using jquery 1, which is the default with rails-jquery and the slider needs jquery 3 to be draggable on ios.
replace
//= require jquery
with
//= require jquery3
in application.js
from foundation-rails.
This happens because the jQuery code which calls the Element passes 2 parameters:
// ...
dispatch: function(a) {
a = n.event.fix(a);
var b, c, d, f, g, h = [], i = e.call(arguments), j = (n._data(this, "events") || {})[a.type] || [], k = n.event.special[a.type] || {};
if (i[0] = a,
a.delegateTarget = this,
!k.preDispatch || !1 !== k.preDispatch.call(this, a)) {
h = n.event.handlers.call(this, a, j),
b = 0;
while ((f = h[b++]) && !a.isPropagationStopped()) {
a.currentTarget = f.elem,
c = 0;
while ((g = f.handlers[c++]) && !a.isImmediatePropagationStopped())
a.rnamespace && !a.rnamespace.test(g.namespace) || (a.handleObj = g,
a.data = g.data,
void 0 !== (d = ((n.event.special[g.origType] || {}).handle || g.handler).apply(f.elem, i)) && !1 === (a.result = d) && (a.preventDefault(),
a.stopPropagation()))
}
return k.postDispatch && k.postDispatch.call(this, a),
a.result
}
},
// ...
Look at the (d = ((n.event.special[g.origType] || {}).handle || g.handler).apply(f.elem, i))
But in the Foundation.util.touch.js the handler passes only 1 parameter to the handleTouch function. unfortunately it passes the wrong parameter.
I propose you change:
https://github.com/foundation/foundation-sites/blob/develop/js/foundation.util.touch.js#L124
to:
$(el).bind('touchstart touchmove touchend touchcancel', function (elem, event) {
This would solve the Issue.
from foundation-rails.
Related Issues (20)
- will not genrate HOT 4
- Chrome dev tool gets slow HOT 1
- trouble starting project HOT 1
- Responsive Navigation not working as expected in Rails 5.2
- Updating 6.5.1.0 require 'sprockets/es6' isn't working have to change to require 'sprockets/rails' HOT 3
- Ruby Sass ("sass" gem) will be end-of-life March 26th 2019 - Consider switching to "sassc-rails" or "sassc" HOT 10
- foundation.js asset is empty HOT 2
- rails 6.0.0.rc2 install issues HOT 18
- [invalid]
- orbit broken on 6.6.1.0, maybe by motion-ui HOT 2
- is-reveal-open and turbolinks HOT 4
- foundation-rails 6.3.1.0 breaks with Sprockets upgrade to 4.0.0 HOT 5
- Multiple `!global` assignments deprecation warnings on foundation-rails-6.6.2.0 HOT 4
- uninitialized constant Foundation::Rails::Generators
- Rails 6.1 - application.coffee does not appear to exist HOT 1
- How To include JS with webpacker?
- Updating from 6.4.3 to 6.5 HOT 2
- Maintained? HOT 3
- roles in dropdownmenu
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foundation-rails.