Fix upvote button: make it reliably clickable from resource cards#493
Merged
soyalejolopez merged 1 commit intoJul 22, 2026
Merged
Conversation
The card used a full-card stretched-link overlay (a.resource-link::after, inset:0) sitting under the upvote button. The .card-animate transform creates a stacking context that can let the overlay intercept clicks, navigating to the detail page instead of registering the vote (which looked like the upvote reverted). Removed the overlay and handle whole-card navigation in JS, skipping .vote-btn clicks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
soyalejolopez
force-pushed
the
alejanl-microsoft-fix-upvote-button
branch
from
July 22, 2026 15:30
99ec49a to
7a89fba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Fixes the resource-card upvote button so it actually upvotes instead of navigating to the detail page, and makes reactions/upvotes persist reliably.
Root cause
Card navigation used a full-card "stretched link" overlay (
a.resource-link::after { inset: 0; z-index: 1 }) sitting under the upvote button (z-index: 2). The.card-animatefade-in applies atransform, which creates/destroys a stacking context depending on timing. During that window the overlay could intercept the click and navigate to the detail page, so the vote never registered — which looked like the upvote "reverted."Fix
.vote-btnclicks and resolves the resource link from the clicked card.Verification
Verified in a real browser (Playwright) across:
localStoragekeyft-votes)Single-file change:
index.html.