Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update README.md #1

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 13, 2017

Sorry for the noise, I wanted to raise an issue, but issues are disabled at this time on your project.

I'm working on a cordova (hybrid framework for mobile development) project. It's based on jQuery; recently I switched to a NPM-based workflow and your module works great, as you mention I can use browserify-it and all is good.

Before the NPM switch, I used vanilla jQuery (on a previous cordova project) and a custom jquery mobile build, just for the events. The strategy I'm using involves registering namespaced events on each "page" of the SPA and it works great. I can wipe all the registered events while switching between pages and keep things sane. I'm using $(element).on(event.namespace) and off.(event.namespace)

So: After switching from the custom jquery mobile build to NPM, using your module, I'm getting event leakage on some events. swipe gets registered by itself multiple times and does not go away. swiperight and swipeleft do get cleared correctly when I do $(element).off('swiperight.namespace') for example.

Does all this make sense? If maybe all this is does not fall into your use cases, could you point me to where should I begin to fix this?

Thanks!

@SamDelgado
Copy link
Owner

Hi! Sorry to hear you are running into this issue. I am not really in a position to figure out exactly what is causing your problem, as I only updated the original jQuery-touch-events code to be able to work with Browsersify. That being said, I am using this in a Cordova app running through my Samson.js framework and it works flawlessly. I wouldn't recommend using Samson.js because I still haven't gotten around to documenting it and it was built around my specific use cases, but it might be worth checking out my Component code to see how I handle the jQuery events. I delegate all events through a parent element which allows me to easily tear it all down when I am done. I am eventually hoping to remove the jQuery dependency from Samson though, as I am only using it right now for event delegation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant