Giter Site home page Giter Site logo

Comments (8)

anvaka avatar anvaka commented on August 19, 2024 1

Thanks for catching this and fixing it!

This is published as v4.4.0

from panzoom.

dotnetCarpenter avatar dotnetCarpenter commented on August 19, 2024

Using Chrome 65.0.3325

from panzoom.

dotnetCarpenter avatar dotnetCarpenter commented on August 19, 2024

Heh. I just found this comment in the beginning of function _addWheelListener:

// TODO: in theory this anonymous function may result in incorrect
// unsubscription in some browsers. But in practice, I don't think we should
// worry too much about it (those browsers are on the way out)

from panzoom.

dotnetCarpenter avatar dotnetCarpenter commented on August 19, 2024

After debugging the issue in wheel, I have found that the elem is not the same on addEventListener and removeEventListener.

I'm using vue.js, and have to investigate if it's because vue.js is changing the DOM element or if it's in panzoom. What is strange if it's vue.js, is that the other event handlers seems to be removed just fine.

from panzoom.

dotnetCarpenter avatar dotnetCarpenter commented on August 19, 2024

Found it! wheel is listening to owner but trying to remove the wheel listener on domElement.

from panzoom.

dotnetCarpenter avatar dotnetCarpenter commented on August 19, 2024

For everyone else with this issue, I have a published a release candidate here: https://www.npmjs.com/package/@dotnetcarpenter/panzoom

from panzoom.

dotnetCarpenter avatar dotnetCarpenter commented on August 19, 2024

@anvaka nice that you added tests! I was wondering how to test this.

from panzoom.

anvaka avatar anvaka commented on August 19, 2024

you can run npm test in the project's folder

from panzoom.

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.