Skip to content
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

Preserve current open tab after Save and continue editing #290

Open
tyctor opened this issue Mar 10, 2024 · 5 comments
Open

Preserve current open tab after Save and continue editing #290

tyctor opened this issue Mar 10, 2024 · 5 comments

Comments

@tyctor
Copy link

tyctor commented Mar 10, 2024

Hi

i find #157 (comment)
but in my site current tab is not preserved after Save and continue editing

i have installed Baton: rev f96ec29

i read through https://django-baton.readthedocs.io/en/latest/form_tabs.html
but i did find anything about preserving tabs

can you please advice me, what to check?

@tyctor
Copy link
Author

tyctor commented Mar 11, 2024

i found this:

you can open a tab on page load just by adding an hash to the url, i.e. #inline-feature, #fs-content, #group-fs-tech–inline-feature

yes, it is working, when i manually construct such url
but POST (Save and continue editing) url is not changing hash element against context (tab) from which was clicked
it is how it should working? (change hash element in form url when tab is clicked)

@abidibo
Copy link
Member

abidibo commented Mar 11, 2024

@tyctor which baton version? There has been a regression some time ago' fixed in the last releases

@tyctor
Copy link
Author

tyctor commented Mar 11, 2024

@abidibo you are right, after update local repository it is working now

@tyctor tyctor closed this as completed Mar 11, 2024
@tyctor
Copy link
Author

tyctor commented Mar 11, 2024

its working with one exception:

when i go to change_form page from filterred change_list (i.e i have filter in url, ?_changelist_filters=q%3Dplaying#inline-punctum_radio-punctumradiogenretoplay-content_type-object_id), it is not preserving tab.

@tyctor tyctor reopened this Mar 11, 2024
@abidibo
Copy link
Member

abidibo commented Mar 13, 2024

Hi @tyctor
yes, you're right. That happens because when there is something in the query string, the hash gets lost, and when reloading Baton cannot retrieve the right tab. I'm not sure there is an easy way to fix this (using local storage is an option but I don't like it too much).

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

No branches or pull requests

2 participants