Comments (8)
I'm facing the same issue.
from ngsmoothscroll.
So do I
from ngsmoothscroll.
+1 same here
from ngsmoothscroll.
+1
from ngsmoothscroll.
+1
from ngsmoothscroll.
+1 Same with my current project
from ngsmoothscroll.
This and #68 are related, it is the return false
in the click handler which stops the event from propagating to other handlers.
This is related to jQuery and jQuery's events and how angular uses jQuery (instead of jqLite) when it is present when angular loads. Essentially, return false
from within a jQuery event handler is effectively the same as calling both event.preventDefault
and event.stopPropagation
on the passed jQuery.Event object. This causes it to not trigger other handlers.
Workaround: Load angular before jQuery. Angular will use jqLite Note: If some of your angular logic (or other third-party angular logic) depend on angular using jQuery instead of the default jqLite, it will break.
Fix: Remove the return false
, it is not exactly needed since event.preventDefault
is called. I am not 100% sure if jqLite's event will always have preventDefault
, but it is currently assumed to always be there anyways (the current code does not check if it exists before it calls it), something like event.preventDefault ? event.preventDefault() : event.returnValue = false;
works well and will work in IE too.
More infotmation about angular and jqLite vs jQuery: https://docs.angularjs.org/api/ng/function/angular.element
More information about jQuery events vs regular events: http://stackoverflow.com/a/1357151/1873485
from ngsmoothscroll.
I haven't included jQuery. Still facing this issue.
from ngsmoothscroll.
Related Issues (20)
- Error: [$injector:unpr] Unknown provider: smoothScrollProvider <- smoothScroll <- IndexCtrl HOT 2
- Having a hard time understanding the usage of this directive HOT 2
- Does not work with iOS
- Offset on end element using "scrollTo" directive HOT 1
- Avoiding form submit when used in submit button.
- scrollTo broken in min.js but working in .js HOT 13
- Documentation HOT 1
- smoothScroll as a service works in .js but not in min.js HOT 5
- Scrollspy or active state HOT 1
- unknown provider HOT 1
- scrolling not working HOT 12
- issues with bootstrap navbar toggle
- Scrolling cannot initiate when scroll position is at extreme bottom inside a container.
- Breaks scrolling with -webkit-overflow-scrolling: touch; on iOS
- Stop scroll bubbling
- scroll getting stuck at the bottom of the page
- How to add active class??
- scroll-to directive not working on touchscreen HOT 2
- Minified version didn't work HOT 2
- smoothScroll service not working for me
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 ngsmoothscroll.