Skip to content

external links don't work in history router mode #1803

Closed

Description

@pagyew

Bug Report

Steps to reproduce

  1. Set routerMode to history.
  2. Create mailto link with <my@mail.com>, or any external link.
  3. Click on rendered link.

What is current behaviour

Crashes with error:

SecurityError
Failed to execute 'replaceState' on 'History': A history state object with URL 'mailto:my@email.com' cannot be created in a document with origin 'https://kc32ry.csb.app' and URL 'https://kc32ry.csb.app/'.

What is the expected behaviour

Native behaviour

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: macOS Catalina, version 10.15.7

  • Node.js version: 16.13.2

  • npm/yarn version: npm v8.1.2

  • Browser version: Google Chrome 100.0.4896.127

  • Docsify version: 4.12.2

  • Docsify plugins: -

Please create a reproducible sandbox

Edit immutable-sunset-kc32ry

Live example: https://docs.lume.io/

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

Activity

  1. trusktr commented on Jan 9, 2023

    @trusktr
    Member

    Indeed, non-docsify links (external links) are currently not working in history router mode. We need to fix this and add tests.

    live example: https://docs.lume.io/

  2. changed the title [-]mailto link doesn't work in history mode[/-] [+]external links don't work in history router mode[/+] on Jan 9, 2023
  3. trusktr commented on Jan 22, 2023

    @trusktr
    Member

    I found the issue. It happens when externalLinkTarget: '_self' is specified. Fix WIP

  4. added 2 commits that reference this issue on Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfirmed as a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions