Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
Open a new tab along with PIP (picture in picture) when clicking on a button makes the browser to block the new tab

I have a button that clicking on it should open a PIP and open a new tab.

The issue is that if when I use them together, the browser blocks the new tab.

I have tried setTimeout and switch the order of the actions.

This is the code of the PIP:

const togglePictureInPicture = (video: HTMLVideoElement) => {
    if (document.pictureInPictureElement) {
        document.exitPictureInPicture()
    } else {
        if (document.pictureInPictureEnabled) {
            video.requestPictureInPicture()
        }
    }

The code of the opening a tab is a simple window.open('_blank')

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!