fix: popup reference in close handler desktop/mobile