diff --git a/src/puter-js/src/ui/components/PuterContextMenu.js b/src/puter-js/src/ui/components/PuterContextMenu.js index 3592c1422..03f8e209c 100644 --- a/src/puter-js/src/ui/components/PuterContextMenu.js +++ b/src/puter-js/src/ui/components/PuterContextMenu.js @@ -693,6 +693,10 @@ class PuterContextMenu extends PuterWebComponent { }); el.addEventListener('mouseleave', () => { + // iOS Safari synthesizes mouseleave on touchend after a tap, + // which would schedule the just-opened submenu to close. + // On touch, submenus are driven by explicit taps, not hover. + if ( this._isMobile() ) return; clearTimeout(this.#submenuTimeout); if ( el.dataset.hasSubmenu === 'true' && this.#activeSubmenu && this.#activeSubmenu.parentEl === el ) { this._scheduleSubmenuClose();