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

197
Views
FCM not openning in new tab if one is already openned

I'm using FCM on a website built with react and it working as expect only if there are not tabs opened with that website (opening a tab with the url sent from notification body). But if there is a tab with that site the notification will only focus that tab.

How can I change the behavior so that it will ALWAYS open a new tab with specified url?

servicer worker

importScripts("https://www.gstatic.com/firebasejs/9.6.3/firebase-app-compat.js");
importScripts('https://www.gstatic.com/firebasejs/9.6.3/firebase-messaging-compat.js');

const config = {
  apiKey: "AIzaSyA6pfbdtbGttzDe6Z41HzPdrPuFoucPm7o",
  authDomain: "test-wolves-app.firebaseapp.com",
  projectId: "test-wolves-app",
  storageBucket: "test-wolves-app.appspot.com", 
  messagingSenderId: "875146575890",
  appId: "1:875146575890:web:b4504731d682606d4618cb",
  measurementId: "G-DJKZCCBB0Q"
}

firebase.initializeApp(config);
const messaging = firebase.messaging();

Notification are come as expected. Just that click action behaves differently

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Focusing on the existing tab where the app is already open sounds like the expected behavior to me.

There is no way to configure this behavior to be any different, but you may be able to run custom logic in the onMessage and/or onBackgroundMessage functions.

about 4 years ago · Juan Pablo Isaza Report
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!