-
Notifications
You must be signed in to change notification settings - Fork 547
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
[BUG] anchor link doesn't work on pages #4312
Comments
@zyhfish we can't change the base tag as there are a variety of things which depend on it. Have you tried to specify the hyperlink as "/#test"? Have you tested to see if anchors work when navigating from a different page? I have a feeling that this issue is isolated to the home page which has a path of "/". For example on https://www.oqtane.org the menu is using anchors for various sections on the page ie. #about #features #showcase and it works fine. |
Hi @sbwalker , the problem is anchor links on all other pages which link to home page. |
@zyhfish if I am on the Blog page (https://www.oqtane.org/blog) and click on the About link in the menu (which links to the home page with path "/" and anchor #about) it works fine. |
Hi @sbwalker , yes, that because the link is really want to link to the home page. If you try to add a new blog with below content:
when click on the link, the expected behavior is scroll the page to the anchor, but the actually result is page will be redirected to the home page. |
@zyhfish so the simple solution is if you want to link to an anchor, include the relative page path in the hyperlink:
|
Yes, but the content editors will be confused and becomes hard to maintenance the content. for example if they have Table of contents on the page which contains many anchor links, then if the page path been changed, they have to modify all the links to update the path. |
Blazor requires the specification of |
closing as I do not believe there is a solution |
Oqtane Info
Version - 5.1.2
Render Mode - Static
Interactivity - Server
Database - SQL Server
Describe the bug
anchor link doesn't work on pages because there is base tag pointed to home page:
oqtane.framework/Oqtane.Server/Components/App.razor
Line 41 in d449396
Expected Behavior
the anchor link should link to the anchor on the page.
Steps To Reproduce
The text was updated successfully, but these errors were encountered: