Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not scroll to top when clicking challenge tabs #71

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

erdnaxe
Copy link
Contributor

@erdnaxe erdnaxe commented Mar 12, 2024

f6b731d introduced a href attribute on the anchors used as Bootstrap tabs.
As there is nothing in JS preventing the default click action, this causes this page to scroll to top (sorry).

A simple fix would be to use @onclick.prevent with AlpineJS, but a cleaner fix is to use button elements. Using anchors as tabs does not really make sense here as users don't need to drag&drop the anchor.

f6b731d introduced a `href` attribute
on the anchors used as Bootstrap tabs.
As there is nothing in JS preventing the default click action, this
causes this page to scroll to top (sorry).

A simple fix would be to use `@onclick.prevent` with AlpineJS, but a
cleaner fix is to use button elements. Using anchors as tabs does not
really make sense here as users don't need to drag&drop the anchor.
@ColdHeat ColdHeat merged commit 8c5e56b into CTFd:main Mar 15, 2024
1 check passed
@ColdHeat
Copy link
Member

I feel like there was a reason for a tags but it might just be lost to time. Trusting your judgement on this since I think you have much more experience with Bootstrap than I 😄

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.

2 participants