- Do you want to request a feature or report a bug?
bug
- What is the current behavior?
Clicking on any internal links in the docs pages (i.e. pointing to somewhere under https://www.netlifycms.org/docs/), the href gets mangled: the href is appended to the current page's URL, like it was an internal link.
The source code looks ok, though, so my guess is some javascript is involved. Links to external URLs work ok too.
- If the current behavior is a bug, please provide the steps to reproduce.
- What is the expected behavior?
The correct page should get opened.
@vladdu I am not able to reproduce this issue. What browser are you using? Can you try another browser and let me know if the page opens correctly for you?
You are right, it seems to be browser-related. I have chrome 68, on Windows. Will test a little more (disabling extensions, etc) --> no, that did not make any difference.
I can confirm that it works as expected if I disable Javascript on the page, from the dev tools.
I found something in gatsby catch-links.js:56, see below. I can't understand why it happens only to me, but I will report it there instead.
// For when pathPrefix is used in an app and there happens to be a link
// pointing to the same domain but outside of the app's pathPrefix. For
// example, a Gatsby app lives at https://example.com/myapp/, with the
// pathPrefix set to `/myapp`. When adding an absolute link to the same
// domain but outside of the /myapp path, for example, <a
// href="https://example.com/not-my-app"> the plugin won't catch it and
// will navigate to an external link instead of doing a pushState resulting
// in `https://example.com/myapp/https://example.com/not-my-app`
var re = new RegExp("^" + a2.host + (0, _gatsbyLink.withPrefix)("/"));
if (!re.test("" + a1.host + a1.pathname)) return true;
// TODO: add a check for absolute internal links in a callback or here,
// or always pass only `${a1.pathname}${a1.hash}`
// to avoid `https://example.com/myapp/https://example.com/myapp/here` navigation
Most helpful comment
https://github.com/gatsbyjs/gatsby/issues/6888