-
-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optimizations.moveElement: false still moves DOM node #54
Comments
I'm running into the same exact issue. |
Same issue here. As far I can see, the string "moveElement" doesn't even appear in the source code. |
@zackbloom My bad, don't know how I missed it. Can you confirm the issue, though? |
i think i fixed it in #65 -- you'll have to build to try it, but it works for me. |
+1, doesn't work. |
same here can be fixed by moving replacing lines 910 with 909 thus making the move inside the closing curly braces |
+1 This is a big problem. |
@zackbloom Can you merge #65 to get this fixed? |
I just want to clarify what
When Perhaps there should be another option which disables all moving, but that will require some changes to the positioning logic, as if the element has parents that are not I apologize for the confusion, and am sympathetic to the issue, but |
The real confusion here is that what you're saying completely contradicts
|
Oh, well nuts. Anyway I've actually been running in production with my edit in #65 live on Time.com for the past 6 months and it works the way I need it to, lol The use case is when I render a flash object that is tethered, removing it from the DOM actually destroys the flash object and appending it causes a new one to be created. |
My formatting got screwed up by email, but you get my point? The docs indicate that disabling moveElement means the node won't be moved in the DOM. |
That will work as long as you meet some criteria like not having positioned On Thu, Jan 22, 2015 at 11:04 PM, davidosomething [email protected]
|
@davidosomething first off, I want to say thanks for using Tether on Time.com. That’s awesome. Unfortunately, Zack’s last point is correct, that not moving the element won’t work as a general solution for everyone. I’d be in favor of renaming |
+1 on that since they serve different use cases, and I got lucky the lines to detach and reappend the the DOM nodes were in @Move() Can you provide a working example of where the current moveElement optimization is needed (e.g. a demo of the failing case and then a working case with the optimization)? I think it would help to have the visual explanation since we all misunderstood its use. |
+1 |
Guys using React, here's my solution: https://gist.github.com/mik01aj/5b98bad5b5ba04a1b93f |
Even with
optimizations.moveElement
set tofalse
the DOM node is moved. That makes it extremely hard to use Tether with e.g. React that depends on a non-changing DOM.In the example on tether.io the attachment is moved to the body too. The documentation indicates that it should not be moved.
Do I miss anything?
The text was updated successfully, but these errors were encountered: