GithubHelp home page GithubHelp logo

Comments (7)

IjzerenHein avatar IjzerenHein commented on July 18, 2024

I'd have to investigate what the problem is, unfortunately I have no time for this at the moment. I do think it is related to the VirtualViewSequence that underlies the DateTimePicker. Hope that helps.

from famous-flex.

 avatar commented on July 18, 2024

First thanks for the new release.

Unfortunately, it didn't fix this particular issue. The new LinkedListViewSequence class isn't used here?

from famous-flex.

IjzerenHein avatar IjzerenHein commented on July 18, 2024

That's right, I haven't had time to look at this issue yet.

from famous-flex.

IjzerenHein avatar IjzerenHein commented on July 18, 2024

If you could share a live demo that I can debug that would really help.
cheers

from famous-flex.

 avatar commented on July 18, 2024

You can use you own demo
https://rawgit.com/IjzerenHein/famous-flex-datepicker/master/dist/index.html
it happens there too.
Some sort of pattern:

  • it never happens when scrolling slowly
  • it only happens on the first attempt to scroll
  • if you don't see the issue at the first attempt you need to reload the page and try to scroll faster
  • if you see the issue, after scrolling back and force the number sequence is in order again
  • if, for example, the minutes number sequence looks like 04 05 13 07 08 and scroll stops at 13 datePicker.getDate().getMinutes() returns the correct value: 6

Hope that helps debugging.

from famous-flex.

IjzerenHein avatar IjzerenHein commented on July 18, 2024

Hi, I've had a look and was able to reproduce the problem using your steps.

So the problem here is caused by a bug in the famous engine, where Surface.setContent() is not handled correctly. Here is the official bug-report: Famous/famous#673

To solve this problem, you will need to include the following fix in your famo.us app:

     /**
     * FIX for famous-bug: https://github.com/Famous/famous/issues/673
     *
     * There is a bug in recall which causes the latest setContent()
     * call to be ignored, if the element is removed from the DOM in
     * the next render-cycle.
     */
    Surface.prototype.recall = function recall(target) {
        if (!this._contentDirty) {
            var df = document.createDocumentFragment();
            while (target.hasChildNodes()) {
                df.appendChild(target.firstChild);
            }
            this.setContent(df);
        }
        else {
            this._contentDirty = true;
        }
    };

This patches the Surface.setContent issue. I've updated the famous-flex-datepicker project to include the fix as well:
https://github.com/IjzerenHein/famous-flex-datepicker/blob/master/src/main.js

Let me know whether this fixes your issue.

Cheers,
Hein

from famous-flex.

 avatar commented on July 18, 2024

@IjzerenHein Awesome! Thanks so much.

from famous-flex.

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.