Use document/window from event target instead of global