Skip to content

Unexpected change of context errors#928

Merged
sfisher merged 4 commits intodevelopfrom
919-bug-unexpected-change-of-context-in-profile-dropdown
Sep 3, 2025
Merged

Unexpected change of context errors#928
sfisher merged 4 commits intodevelopfrom
919-bug-unexpected-change-of-context-in-profile-dropdown

Conversation

@sfisher
Copy link
Contributor

@sfisher sfisher commented Aug 21, 2025

I'm bundling all the "change of context" errors within this PR:

The problem is that the page reloads to change the page content (the old style way) and the place in the page gets lost when using the keyboard. This applies to the 4 pages demo/simple, demo/advanced, create/simple, create/advanced.

The controls that change the page content are 1) going from Ark to DOI or DOI to ARK, 2) or changing the profile. Both these reload the page for new contents but weren't going back to the same place in the page afterward in some cases.

Now we should observe that it goes back to where it came from afterward.

A longer term fix may be either using something like AJAX and unobtrusive javascript to reload parts of the page and replace sections of the page (rather than the whole page) or load all the contents for everything (whatever could possibly change) into a massive page and then just hide and show things with Javascript.

I'm a little afraid to go too far down these roads since the forms are complicated, the way the scripts get attached are not always clear and it would be a major change with more possibilities to break functionality along the way, but maybe it's worth doing sometime.

What is here works fine but it's just a little "old school" (and I think I saw some internet Explorer support in there still 😱 ). I think some of the EZID site got created in the early 2010s before the JS frameworks to do this stuff more easily were more common (see also jQuery, which was sort of needed until the browsers got their stuff together and got more compatible with Javascript around 2016 with ES6 when it started getting more adoption).

@sfisher sfisher linked an issue Aug 21, 2025 that may be closed by this pull request
@sfisher sfisher changed the base branch from main to develop August 22, 2025 00:01
@sfisher sfisher merged commit 95d23ac into develop Sep 3, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

[BUG] Unexpected change of context in profile dropdown

1 participant