Skip to content

Unable to open model page via window.open() #14

@apdavison

Description

@apdavison

(migrated from HumanBrainProject/hbp-validation-framework#299)

appukuttan-shailesh commented on Mar 9, 2021:

I am trying to open a model catalog entry in a new tab via its URL on the click of a button when using window.open() in JS. For some reason the new window opens and closes immediately.

To reproduce this problem, try this:
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open
It works fine with their example URL.

But the moment I change it to: https://model-catalog.brainsimulation.eu/#model_id.00f2e856-27a8-4b8d-9ec3-4e2581c546e4 the page opens and closes. Happens both on Chrome and Firefox.... and seems to be arising from our app, as other URLs work fine.

Workaround for now is to use anchor tags: <a href={url} target="_blank">...</a>

Metadata

Metadata

Assignees

No one assigned

    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