-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Cut element renders in preview frame #2123
Comments
The cut element will only be removed after it has been pasted somewhere. alchemy_cms/app/controllers/alchemy/admin/elements_controller.rb Lines 134 to 146 in 6f6f477
So it does not get lost if the user forget about pasting it or accidentally cut it. Not sure if we want to change that. Since the preview frame is not a live-preview, but only gets reloaded after a persisted change, we would need to destroy the element and then reload the preview. We could theoretically remove the element from the iframes DOM, but there might be much more involved with that. You could give it a try, though |
Right, this is a much bigger thing than I expected. I think another approach could be to update the element by removing the page_id and position (which feels like actually cutting it off from that page) and update the preview frame. The issue followed by this is how to handle those intentionally "orphaned" elements afterwards. One crazy thing (that needs a lot more thinking though) could be to allow the admin user to see/manage a new route I'll stop now since this brainstorming is going too far :) |
Steps to reproduce
Expected behavior
I expect to not see that cut element rendered in the Preview frame
Actual behavior
I see the cut element rendered in the preview frame.
System configuration
main
branchThe text was updated successfully, but these errors were encountered: