Git Product home page Git Product logo

Comments (4)

matthew-andrews avatar matthew-andrews commented on July 26, 2024

Just because two popular ajax libraries do something doesn't make it a standard…

I honestly don't remember why we do both stopPropagation & stopImmediatePropagation but I do know that this would be a breaking API change and we'd need to do a major version bump & massive retesting of our websites. Is there any other reason than to match older libraries that this should be changed?

from ftdomdelegate.

lazd avatar lazd commented on July 26, 2024

@matthew-andrews, the behavior is both unexpected and undocumented, hence the issue report. My suggestion is to match the behavior users familiar with other libraries will expect, but it's fine if the library behaves differently -- at least document it.

It should be noted that stopImmediatePropagation() itself is never actually called; it's breaking out of both the listener loop and the propagation loop by returning that achieves this effect by not calling the rest of the listeners as well as preventing simulated propagation. The comment above it says Stop propagation to subsequent callbacks, which, to me sounds like a mix up the notion of DOM propagation with preventing other listeners from being called, so I wondered if the original behavior may have been coded in error.

from ftdomdelegate.

matthew-andrews avatar matthew-andrews commented on July 26, 2024

I wondered if the original behavior may have been coded in error.

Quite possibly. I'm not against this change as long as it actually fixes something but I've never come across a problem related to this – I just disagreed with the idea that we were non-standard.

from ftdomdelegate.

matthew-andrews avatar matthew-andrews commented on July 26, 2024

Alright I think you're right. We ought to fix this… Thanks for taking the time to report the bug so thoroughly. It'll need to be a major version bump though as there's a danger it'll create bugs.

Pinging @wheresrhys @georgecrawford @rowanbeentje

from ftdomdelegate.

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.