Skip to content

Problem with Link and NavLink #25

Closed
@birdofpreyru

Description

@birdofpreyru

if (url.origin !== document.location.origin) {
document.location.assign(to);
e.preventDefault();
/* Scroll to the top-left corner of the page, just in case the link
* references the same page we are already in. */
} else window.scroll(0, 0);

This works right when the link is clicked by letf mouse button. Though, it does not work when it is clicked by the right mouse button. If we arrive to this case, react-router always considers to value as a relative address, and appends it to the current domain in the link. Should be reverted to server-side rendering solution via Redux, where domain is extracted from the request and used to render instead of

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions