Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

twice window.open but can not open a tab #29

Open
nillwyc opened this issue Sep 21, 2023 · 0 comments
Open

twice window.open but can not open a tab #29

nillwyc opened this issue Sep 21, 2023 · 0 comments

Comments

@nillwyc
Copy link

nillwyc commented Sep 21, 2023

A very cool project, and i found
there is a strange case when i ran project with a simple main page just like this below:

<div><button id="b2" > test2 </button></div>
<script>
b2 = document.getElementById("b2")
b2.addEventListener("click",
    (event) => {
        alert('b2')
        window.open('https://www.google.com', 'bbbddd');
    },
    false,
)
</script>

First when i clicked the button 'test2' to open a new Google tab-page, it worked;

then i closed this new-opend page by clicking the 'x' on the tab card;

so that i switched to the original simple main page;

and next, i clicked the button 'test2' again to open a new Google tab-page, BUT it can't work.

As I repeated these steps with the simple page on Chrome browser, it work well.

i found it would worked as long as using un-uniqe value on the second parm of func 'window.open' like

window.open('https://www.google.com',  'bbbddd'+new Date().getTime());

Can u help this out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant