Skip to content

Storage Re-names element IDs #44

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

Open
wunksert opened this issue Sep 5, 2023 · 3 comments
Open

Storage Re-names element IDs #44

wunksert opened this issue Sep 5, 2023 · 3 comments

Comments

@wunksert
Copy link

wunksert commented Sep 5, 2023

I've built Template manager from source so I can specify where the break is happening

Reproduce

  1. Set editor.storageManager.autosave: true
  2. Create a new layout
  3. Add a basic text element with padding
  4. autosave should trigger
  5. refresh and open the layout you just created
  6. the padding is gone, because the element's ID has changed from id123 to id123-2 so the CSS selector #id123 doesn't select any more

The storage:store and storage:load events are also fired like 10 times. Why is it built like that?

@Ju99ernaut
Copy link
Owner

For ids setting -2 refer to this issue #25 also if you’re using autosave save will get triggered on minimal changes such as component selection so those events will be fired multiple times.

@wunksert
Copy link
Author

wunksert commented Sep 7, 2023

@Ju99ernaut - I uploaded a screen capture to demonstrate. It seems like this is a lot of update calls (storage:store) for adding just one element, doesn't it?

Screen.Recording.2023-09-06.at.9.05.03.PM.mov

@abozhinov
Copy link

Hi,
did anyone find a solution to the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants