mirror of
https://github.com/discourse/discourse.git
synced 2025-03-29 11:50:44 +08:00
UX: Render polls within the same run loop.
* Rendering polls in a seperate run loops causes our topic list page to be jumpy because of changing heights after polls have been rendered.
This commit is contained in:
parent
201d344a2d
commit
6e385f11b3
@ -101,7 +101,7 @@ function initializePolls(api) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$poll.replaceWith($div);
|
$poll.replaceWith($div);
|
||||||
Em.run.next(() => pollView.renderer.replaceIn(pollView, $div[0]));
|
Em.run.schedule('afterRender', () => pollView.renderer.replaceIn(pollView, $div[0]));
|
||||||
postPollViews[pollId] = pollView;
|
postPollViews[pollId] = pollView;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user