Comments (4)
I have two elements, parent and child working with tap.
currently Im testing the event object in my parent for event.isTrigger === undefined.
If this property isn't there I know this event is caused directly by the parent tap, if it is there, it means that the child tap event was called and I can ignore this tap on the parent.
I also need to set domEvents: true on the call to the hammer plugin "hammer({domEvents: true})" for the parent (not the child);
I'm not sure how reliable this is cross browser or how it would work with a child within a child, but for my current needs it works.
Still it would be nice if I could use the jquery plugin and use the propagation.js
from propagating-hammerjs.
It may work if you first load the propagating-hammer.js
script, then override the global Hammer
instance (like in this example), and last load jquery.hammer.js
. Did you try that?
from propagating-hammerjs.
Yes this worked, but it's annoying to have to load the plugin afterwards. Can't you do anything to fix this? There must be lots of people using the widget and your propagation.js
from propagating-hammerjs.
I can think of two options:
- Create a new module
jquery.propagating.hammer.js
which combines both. - Use vanilla JavaScript instead of
jquery.hammer.js
. There isn't really much need for jQuery anymore, and JavaScript isn't that scary ;)
from propagating-hammerjs.
Related Issues (11)
- Anyway to run client side with Meteor HOT 11
- panmove is not work when swipe first time in device of android HOT 1
- angular 6/7 HOT 1
- export also as ESM module HOT 2
- Way to emit events in test code that is compatible with propagating-hammerjs HOT 4
- Performance of Vertical Scroll is less in android chrome using propagating.js HOT 1
- Use apply() in stopPropagation wrapper HOT 3
- Propagation is not stopped for dynamically added items HOT 2
- Multitouch does not work HOT 4
- needs domEvents:true? but this causes issues HOT 1
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 propagating-hammerjs.