Skip to content

FINERACT-2600: Fix theme toggle scrolling page to top on click#57

Open
bagusrizkis wants to merge 1 commit into
apache:asf-sitefrom
bagusrizkis:FINERACT-2600-fix-theme-toggle-scroll
Open

FINERACT-2600: Fix theme toggle scrolling page to top on click#57
bagusrizkis wants to merge 1 commit into
apache:asf-sitefrom
bagusrizkis:FINERACT-2600-fix-theme-toggle-scroll

Conversation

@bagusrizkis
Copy link
Copy Markdown

Summary

Replace the theme toggle anchor (<a href="#">) with a <button type="button">, and reset background and border in CSS so the visual is identical to before.

Why

JIRA: FINERACT-2600

Clicking the toggle scrolled the page to top because href="#" triggered default anchor navigation. <button> is also semantically correct since the toggle doesn't navigate anywhere, and Space-key activation works for free.

Testing

Served locally and verified the bug reproduces with the original markup, then no longer reproduces after the change. Toggled multiple times across scrolled positions, theme switches in place. Visual rendering identical to before. Tested in Safari, Chrome, and Firefox.

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.

1 participant