Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

190
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda