Skip to content

Clicking Follow on search results or explore people navigated to the profile instead of toggling the follow state.#26

Merged
cbl merged 1 commit into
mainfrom
fix/search-follow-opens-account
Apr 16, 2026
Merged

Clicking Follow on search results or explore people navigated to the profile instead of toggling the follow state.#26
cbl merged 1 commit into
mainfrom
fix/search-follow-opens-account

Conversation

@cbl

@cbl cbl commented Apr 16, 2026

Copy link
Copy Markdown
Member

Fixed

  • search.vueFollowButton was inside a <NuxtLink>. The .prevent.stop modifiers on custom @follow/@unfollow events had no effect on the native click, which bubbled up and triggered navigation. Added @click.prevent.stop to intercept the native event.
  • explore/people.vue — same bug with a @click div wrapper instead of <NuxtLink>. Same fix.

Not affected

  • AccountListItem.vue — action slot wrapper already has @click.stop
  • Status.vuehandleStatusClick uses target.closest() to skip buttons/links
  • NotificationGroup.vue — all nested buttons use @click.stop

Added

  • e2e/helpers/mock-api.ts — follow/unfollow API endpoint mocks
  • e2e/tests/search/follow-button.spec.ts — 2 E2E tests verifying Follow click stays on page (search + explore/people)

@cbl cbl merged commit 89fd01a into main Apr 16, 2026
2 checks passed
@cbl cbl deleted the fix/search-follow-opens-account branch April 16, 2026 11:40
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