Skip to content

Conversation

@pygy
Copy link
Member

@pygy pygy commented Jul 15, 2016

This fixes the fiddle, but #1149 still gives an error, probably due to the fact that the second mount occurs at redraw time and redraws are batched.

I'll add a proper test later (unless someone beats me to it).

(#1146)

@pygy
Copy link
Member Author

pygy commented Jul 15, 2016

That's odd, the tests pass locally.

Edit: Likely a fluke due to timer resolution. Maybe using FRAMEBUDGET * 2 in the throttle tests would make them more reliable?

@pygy
Copy link
Member Author

pygy commented Jul 15, 2016

I removed the build artefact from the branch the patch is based on.

Note that, when running npm run build, I ended up with this line

looking like this:

        }, function(path, params) {
            router.setPath(defaultRoute, null, {replace: true})
        })

I had to fix it manually.

@pygy pygy changed the title Fix 1146 Event handlers redraw all mount points. Fix #1146 Jul 15, 2016
@lhorie lhorie merged commit 2613715 into MithrilJS:rewrite Jul 15, 2016
@barneycarroll
Copy link
Member

This works in practice (the original problem case jsbin visibly just works), but not in theory — I couldn't get any lifecycle tests to pass this. I guess I'll have to invoke the autoredraw API…

@pygy pygy mentioned this pull request Jul 20, 2016
pygy added a commit to pygy/mithril.js that referenced this pull request Jul 25, 2016
lhorie added a commit that referenced this pull request Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants