Skip to content

docs: if a search jump link is visited without history, the search widget's close button opens a blank page #9078

@zowiebeha

Description

@zowiebeha

Description

If the user opens a new tab and visits an api reference jump link URL to open the search widget, and if the user clicks the close button in the search widget, the page will open a blank (default) tab in the current window. This might be because the close functionality utilizes previous URL history, and if there is none, it will give us a blank window-- though I am not completely sure.

This could be changed by checking to see if there is no prior history, and if so, open the correct api ref page URL without the search widget's jump link.

chrome_VuiFMEUOWT.mp4

Reduced test case

https://docs.videojs.com/audiotracklist#LiBfqbJVcV

Interestingly, a middle click to this URL will cause the correct behavior to occur when the close button is clicked. If the link is pasted into a new tab the error occurs.

Steps to reproduce

  1. Open the test case link in a fresh tab
  2. Click the close "x" button in the top right of the widget
  3. See the browser's default tab open in the current tab

Errors

No response

What version of Video.js are you using?

latest

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

all

What OS(es) and version(s) does this occur with?

all

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: triageThis issue needs to be reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions