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

fix(router): scroll back to the hash anchor even if it is already selected #2265

Merged
merged 2 commits into from Apr 21, 2023
Merged

fix(router): scroll back to the hash anchor even if it is already selected #2265

merged 2 commits into from Apr 21, 2023

Conversation

lchzh3473
Copy link
Contributor

即使hash与当前hash相等,我们仍然需要将其滚动到对应锚点。
否则当我们点击锚点后手动滚回原位,再次点击相同的锚点时将没有任何反应。
Even if the hash is equal to the current hash, we still need to scroll it to the corresponding anchor.
Otherwise, when we click on the anchor and then manually roll back and click on the same anchor again, there will be no response.

@lchzh3473 lchzh3473 changed the title fix(route): avoid no response when last anchor clicked fix(router): avoid no response when last anchor clicked Apr 21, 2023
@lchzh3473 lchzh3473 changed the title fix(router): avoid no response when last anchor clicked fix(router): avoid non-response with the same hash anchor Apr 21, 2023
@brc-dd
Copy link
Member

brc-dd commented Apr 21, 2023

Hey can you run pnpm format and commit again?

Even if the hash is equal to the current hash, we still need to scroll it to the corresponding anchor.
@lchzh3473
Copy link
Contributor Author

Hey can you run pnpm format and commit again?

OK, I've run pnpm format and committed the changes.

@brc-dd brc-dd changed the title fix(router): avoid non-response with the same hash anchor fix(router): scroll back to the hash even if it is already selected Apr 21, 2023
@brc-dd brc-dd changed the title fix(router): scroll back to the hash even if it is already selected fix(router): scroll back to the hash anchor even if it is already selected Apr 21, 2023
@brc-dd brc-dd merged commit f3d3332 into vuejs:main Apr 21, 2023
7 checks passed
@lchzh3473 lchzh3473 deleted the patch-1 branch April 21, 2023 08:55
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants