Skip to content

A cross-origin url on _coverpage file cannot be redirected to if "routerMode" is set to "history" #1379

Description

@BeamerIsHere

Bug Report

Steps to reproduce

Set these lines in index.html

 window.$docsify = {
//...
loadSidebar: true,
routerMode: 'history',
coverpage: true,
onlyCover: true,

Then use any other doman URLs in _coverpage file, See below...

<a href="https://rstudio.com/auth-sign-in">Login</a><br />

What is the current behavior

when clicking on the link on the cover page there is no response, while checking the browser console getting the following error.

Uncaught DOMException: Failed to execute 'pushState' on 'History': A history state object with URL 'https://rstudio.com/auth-sign-in' cannot be created in a document with origin 'https://datatools.inhouse.com' and URL 'https://datatools.inhouse.com/'.
at https://cdn.jsdelivr.net/npm/docsify/lib/docsify.min.js:1:93866

What is the expected behavior

Redirect to the mentioned web page directly.

Other relevant information

  1. search.min.js
  2. docsify-plugin-flexible-alerts
  3. mermaid.js

Mentioned index.html and _coverpage files are in the below repository. Please check it.

Git repo

Mention the docsify version in which this bug was not present (if any)

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions