Subscribe on changes!

Cannot set the position of the teleport's element

avatar
Mar 1st 2021

What problem does this feature solve?

I tried to use teleport to insert the element into the first position of <body>, but the teleport seems to be unable to set the position prepend and always append to <body>.

What does the proposed API look like?

Maybe we can add a prop, prepend or append or add a order prop, https://portal-vue.linusb.org/api/portal.html#order

avatar
Mar 3rd 2021

@LinusBorg What do you think about this.

avatar
Mar 3rd 2021

I think we discussed this in the original RFC for Teleport and found that the added complexity in the renderer for updates etc, especially concerning order, wasn't worth it, at least initially.

A simple workaround for prepending in body is to add an empty as the first child of body and mount to that.

I'm currently experimenting with a thin layer over Teleport that might provide more complex stuff like order - would be a spiritual successor to portal-vue

avatar
Apr 2nd 2021

@LinusBorg Should we close this one?

avatar
Apr 13th 2021

Closed due to the info given by @LinusBorg