Details: addDetailsPolyfill isn't designed to be called multiple times, causes issues for single page apps with multiple details components #450
Labels
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
🕙 days
A few unknowns, but we roughly know what’s involved
help wanted
Extra attention is needed
Bug Report
What is the issue?
We are using angularjs and therefore have a single page app and due to the started flag in the addDetailsPolyfill() we are unable to call this multiple times when another details element has been dynamically added to the DOM.
Ideally we would like the ability to;
What steps are required to reproduce the issue?
To recreate the issue;
Run the addDetailsPolyfill function and then add another details element to the DOM and then try rerunning the addDetailsPolyfill, the if(NHSUK.details.started) will catch and return meaning that the new details element doesn't get the required new attributes in order to work.
What was the environment where this issue occurred?
The text was updated successfully, but these errors were encountered: