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

Links don't work with target="_self" #1113

Open
antulik opened this issue Dec 28, 2023 · 0 comments
Open

Links don't work with target="_self" #1113

antulik opened this issue Dec 28, 2023 · 0 comments

Comments

@antulik
Copy link

antulik commented Dec 28, 2023

Description
When the target of a link is set to self, target = "_self", Turbo stops working on that link. Link click does a full page reload.

Steps to reproduce the behavior:
add target = "_self" to link, e.g. <a href="/" target="_self">Click</a>.

Expected behavior
Since "_self" is the default target for a link, it should not trigger a full page reload.

Why explicit _self needed if it's default behaviour?
IF you are using different subdomains, e.g. www.github.com and app.github.com
AND you pinned tab in your browser (e.g. Firefox)
THEN when you navigate across subdomains, the browser will open new tab.
BUT adding explicit target="_self" tells browser to force link in the same tab.

Note
Previously raised issue turbolinks/turbolinks#606

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant