Closed zhang2118 closed 6 years ago
Hello @zhang2118 ,
_uihooks
and insertElement
?Hi @dr-dimitru
To answer you question #1, here is a reference for _uihooks
: https://github.com/meteor/meteor/blob/devel/History.md#blaze-6
For #2: nope, I was not getting any errors.
There is an update for this issue. I was able to resolve this issue by installing & using BlazeLayout.render
instead of this.render
in action
hook.
This api from history is outdated, you need to install and use UI
package, or better to use new API
@dr-dimitru There is no new API, all the Blaze animation packages in the wild also rely on _uihooks
@zhang2118 I believe the issue is that because flow-router-extra mounts to a new div element, there is no next
element in the dom to insert before.
In my code using _uihooks
, I check if next
exists and then use either parent.insertBefore
(if it does) or parent.appendChild
@coagmano thank you, thought UI
was replaced by Blaze
@zhang2118 @coagmano why you use such low-level API? For packages or in app?
@dr-dimitru in my case, I'm dealing with legacy code, as you probably can tell. The code was still relying on iron:router before my change.
@zhang2118 there is some incompatibilities between flow and iron routers for sure. I guess you need to update your codebase, right?
@dr-dimitru yeah, we are in the process of updating our codebase. I dug into Blaze, it seems _uihooks
is till used as a non-documented api. I was lucky to get rid of this issue by using outdated BlazeLayout package. But this is not a great solution.
There might be some other meteor developers that are still using _uihooks
? Do you have plan to take a look and fix the issue? since your package is so popular and well maintained.
@zhang2118 do you have any news/update on this one?
Feel free to close it in case if the issue is solved on your end. Meanwhile marked as [help wanted]
zhang2118 did you try my approach?
check if next exists and then use either parent.insertBefore (if it does) or parent.appendChild
@dr-dimitru sorry for the late reply. It was resolved for me by installing meteor/kadira:blaze-layout
and using BlazeLayout.render
. I'll close the issue for now.
@coagmano I did try your solution, but in my case parent.appendChild
was null. Not sure why. So it did not work for me.
Hi,
We are seeing an issue where
_uihooks
stopped working for us, after we replaced iron router with flow-router-extra. The issue happened on both Chrome and Safari.We are currently on flow-router-extra@3.6.0 and our Meteor version is 1.7.0.3
To be more specific, the
next
param forinsertElement
callback function is always set to null. And currently, we do not have a workaround to keep the animations we had around _uihooks. It seems _uihooks is the only way to do animations with Blaze.Here is our .versions file:
HTML looks like this:
And the _uihooks is registered on
#content-container
Please advice, thank you!