Merged
Conversation
…der better for demo simple.
… to remember anchor for returning after page reload. Also server-side analysis to output needed JS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).