You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I comment it out, the arrows on ALL 3 buttons reappear,
The html actually shows the Arrow svg to be there, on the other 2 buttons (and rightly not on the button I am targetting, since the JS replaces the textContent), but it says that the shadow root is closed, with nothing inside it
Uncommenting that line of js, causes the shadow root on the other 2 buttons, to have arrow svg inside it.
Not sure what might be going on?
What's the expected result?
This JS, should only affect the text content of the button being targetted, by id, not the other instances of the custom astro button
const elements = {
backLink: document.getElementById(
"back-home-link",
) as HTMLAnchorElement | null,
};
if (elements.backLink) {
elements.backLink.textContent = t("auth.error.backHome");
}
### Link to Minimal Reproducible Example
seeabove minmal reproducible example
### Participation
- [ ] I am willing to submit a pull request for this issue.
The text was updated successfully, but these errors were encountered:
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I have a custom button:
I have three instances of it on a page.
Here is one of them. Note this has a different id to the other 2 instances
I have some javascript that does this:
But doing this, for some reason causes the Arrow part to disappear on the ALL 3 buttons.
I know it is this one line causing the issue
elements.backLink.textContent = t("auth.error.backHome");
If I comment it out, the arrows on ALL 3 buttons reappear,
The html actually shows the Arrow svg to be there, on the other 2 buttons (and rightly not on the button I am targetting, since the JS replaces the textContent), but it says that the shadow root is closed, with nothing inside it
Uncommenting that line of js, causes the shadow root on the other 2 buttons, to have arrow svg inside it.
Not sure what might be going on?
What's the expected result?
This JS, should only affect the text content of the button being targetted, by id, not the other instances of the custom astro button
The text was updated successfully, but these errors were encountered: