Comments (9)
This works as intended to provide as fast response time as possible.
It's up to the designer/developer to not put the toggle in a place where this functionality would cause harm to the user.
from responsive-nav.js.
I disagree with your argument on this one. There's nowhere on the page where you could guarantee a user won't place their thumb to scroll and swipe, so the plugin firing events on touchstart, to me, is the source of the harm, not the placement of the toggle button.
There are ways to eliminate the 300ms delay without introducing this behaviour. As Google themselves say: "If the user touches down on the button and then drags the screen a bit and then invokes a touchend on the button then we should not fire a click." (Source: https://developers.google.com/mobile/articles/fast_buttons)
And Fastclick (https://github.com/ftlabs/fastclick) also avoids this problem.
Obviously this is your project, I'm just putting two pennies in as to what I think the sensible behaviour should be.
from responsive-nav.js.
@MalabarFront I reopened the issue, maybe we can come up with a good solution to this :)
from responsive-nav.js.
add a touchmove even and cancel the tap if it is fired (with a 5-10px threshold)
from responsive-nav.js.
@cubiq Sounds like a good and simple solution!
from responsive-nav.js.
I have a new version now coming which uses 10px threshold and triggers the menu open on touchend if there's no touchmove. Need just a bit more device testing before pushing to GitHub.
from responsive-nav.js.
Any updates on this one? I'm having the same issue, as my menu is placed further down my page and gets triggered by accident when the user is scrolling.
from responsive-nav.js.
@challahan This issue is fixed in the latest release I just pushed.
from responsive-nav.js.
You're awesome - thank you!
from responsive-nav.js.
Related Issues (20)
- Navigation height with nested <ul> HOT 2
- responsiveNav is not defined HOT 2
- left nav cascaded
- Nav is buged
- closeOnNavClick variable changes location
- Multi-Level Responsive Nav
- Just a navigation. Clicking on navigation doesn't slide to anchor points?
- Checking if class exists
- Add opacity onScroll
- Support for Multi-level Nav HOT 1
- Appears from left or right
- Change hamburger to be an image so doesnt flash on page load
- Multilevel not opening on Android Chrome
- Using different customToggle when js-nav-active
- Plugin installation failed. (No valid plugins were found.)
- Nav not scrollable on dropdowns (where submenus available)
- Not working
- Unable to preventDefault inside passive event listener invocation. HOT 1
- How to initialize with a toggle?
- Explanation for installation process
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 responsive-nav.js.