Giter VIP home page Giter VIP logo

Comments (4)

anglee avatar anglee commented on May 12, 2024

Can you provide steps to reproduce this issue?

from beakerx.

anglee avatar anglee commented on May 12, 2024

This issue is not Beaker specific and has to do with Chrome's inconsistent behavior(bug?) in different versions and how flotr2 handle scrolling.

flotr2 calculate Y by subtracting both document.body.scrollTop and document.documentElement.scrollTop:

https://github.com/HumbleSoftware/Flotr2/blob/70064f754f725b58ca68a13437b20aa25c89a1e2/js/Graph.js#L342

I think their reasoning behind this is to address the different behavior of different browsers. More specifically, it is assuming and relying on the behavior of FireFox where document.body.scrollTop is always 0, and for Chrome, document.documentElement.scrollTop is always 0. (here is one related stackoverflow post, and as a comment there suggested, a better way is (document.documentElement.scrollTop || document.body.scrollTop)).

However, this assumption does not hold true in some version of Chrome. Here is a screenshot comparing Version 35.0.1862.2 canary(lef) and Chrome Version 32.0.1700.107(right).
flotr2

As one can see, in v32, on the right, both document.body.scrollTop and document.documentElement.scrollTop has same and non-zero value, and flotr2 code is subtracting the same value twice.

Possible solution would be to fork flotr2 and change it to use the '||' logic mentioned above. Or, do nothing as seems in newer version of Chrome, the old behavior flotr2 depends on returned.

from beakerx.

scottdraves avatar scottdraves commented on May 12, 2024

is this bug what they are talking about here?
HumbleSoftware/Flotr2#235
ang why did you close this?

from beakerx.

anglee avatar anglee commented on May 12, 2024

Because like I mentioned A. it is not Beaker specific B. the issue doesn't appear to happen in the latest version of Chrome. As for the issue you referred, it is not exactly the same, but the solution proposed there is exactly what I was talking about.

from beakerx.

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.