Fix: Usar pointer device para detectar desktop en lugar de ancho
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 56s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 56s
- Cambiar detección de desktop de min-width a (pointer: fine) - Esto detecta si tiene mouse/trackpad (desktop) vs touch (móvil) - Más confiable para PWAs que se abren con ancho fijo - Mantener ancho como fallback para compatibilidad
This commit is contained in:
@@ -11,8 +11,10 @@ export default defineNuxtPlugin(() => {
|
||||
window.matchMedia('(display-mode: window-controls-overlay)').matches ||
|
||||
(window.navigator as any).standalone === true
|
||||
|
||||
// Detectar si estamos en desktop
|
||||
const isDesktop = window.matchMedia('(min-width: 1024px)').matches
|
||||
// Detectar si estamos en desktop usando pointer device (más confiable para PWAs)
|
||||
const pointerQuery = window.matchMedia('(pointer: fine)')
|
||||
const widthQuery = window.matchMedia('(min-width: 1024px)')
|
||||
const isDesktop = pointerQuery.matches || widthQuery.matches
|
||||
|
||||
if (isPWA) {
|
||||
// Obtener el origin de la aplicación
|
||||
|
||||
Reference in New Issue
Block a user