InputAccordion duplicate elem_id handling #16381
Merged
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.
Description
this implements handling of duplicate element IDs for
InputAccordion
for more details about this issue read #16373
this PR makes
InputAccordion
function correctly if the issue described in #16373 were to occur, this would also forcibly modify the element ID by app ending a numberif an extension actually relies on the element ID for a specific use case for example inside JavaScript then the JavaScript will still not function
so this is just a "increase compatibility" but not a fix
extension should not rely on this
the real fixed requires manual modification with the use of #16373
with this PR
InputAccordion now tracks all previously used InputAccordion elem_id and if if it input ID is found to be a duplicate then it append a number at the end of the input id
a on_script_unloaded callback is added to clear / reset the accordion_id_set and global_index
Checklist: