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

UISref Component ignores target="_blank" on child anchor tag #786

Closed
jesse-smith-dev opened this issue Dec 1, 2020 · 3 comments · Fixed by #799
Closed

UISref Component ignores target="_blank" on child anchor tag #786

jesse-smith-dev opened this issue Dec 1, 2020 · 3 comments · Fixed by #799

Comments

@jesse-smith-dev
Copy link

Behaviour: Link opens in current window
Expected behaviour: Link opens in new window

@christopherthielen
Copy link
Member

christopherthielen commented Dec 16, 2020

Agreed, this should be addressed in the component.

This makes me wonder: how could this even be handled in the useSref hook?

edit: perhaps by inspecting e.target.target on the mouse event

@christopherthielen
Copy link
Member

Copying behavior from uirouter for angularjs, if any target attribute is present, or shift/alt/meta/ctrl is held down, the transition isn't started and it falls back to native browser behavior

christopherthielen added a commit that referenced this issue Dec 22, 2020
…ribute

Also do not handle clicks if shift or alt is being held down.

Closes #786
@mergify mergify bot closed this as completed in #799 Dec 22, 2020
mergify bot pushed a commit that referenced this issue Dec 22, 2020
…ribute (#799)

Also do not handle clicks if shift or alt is being held down.

Closes #786
@christopherthielen
Copy link
Member

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