Giter Site home page Giter Site logo

Comments (8)

mujuni88 avatar mujuni88 commented on June 15, 2024

I'm facing the same issue.

from ngsmoothscroll.

KimSchneider avatar KimSchneider commented on June 15, 2024

So do I

from ngsmoothscroll.

celsomtrindade avatar celsomtrindade commented on June 15, 2024

+1 same here

from ngsmoothscroll.

vrockai avatar vrockai commented on June 15, 2024

+1

from ngsmoothscroll.

 avatar commented on June 15, 2024

+1

from ngsmoothscroll.

helisz avatar helisz commented on June 15, 2024

+1 Same with my current project

from ngsmoothscroll.

TheSharpieOne avatar TheSharpieOne commented on June 15, 2024

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.

keshavr7 avatar keshavr7 commented on June 15, 2024

I haven't included jQuery. Still facing this issue.

from ngsmoothscroll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.