24 lines
614 B
TypeScript
24 lines
614 B
TypeScript
/**
|
|
* Mobile Safari Fixes Plugin
|
|
* Applies mobile Safari specific optimizations on client side
|
|
*/
|
|
|
|
import { applyMobileSafariFixes } from '~/utils/mobile-safari-utils';
|
|
|
|
export default defineNuxtPlugin(() => {
|
|
// Apply mobile Safari fixes on client-side mount
|
|
if (typeof window !== 'undefined') {
|
|
// Apply fixes immediately
|
|
applyMobileSafariFixes();
|
|
|
|
// Also apply on route changes (for SPA navigation)
|
|
const router = useRouter();
|
|
router.afterEach(() => {
|
|
// Small delay to ensure DOM is ready
|
|
nextTick(() => {
|
|
applyMobileSafariFixes();
|
|
});
|
|
});
|
|
}
|
|
});
|