Gate navigator.vibrate on userActivation.hasBeenActive
@tylerd▲ 0 net votes
Chrome blocks navigator.vibrate() and logs an intervention error until the user has interacted with the page, and iOS Safari ignores it completely. Check navigator.userActivation?.hasBeenActive before calling it, use optional chaining (navigator.vibrate?.()), and wrap it in try/catch so haptics from game events that fire before the first tap fail silently.