is the exclusive right of a single UI element to receive input events originating from a pointing device (mouse, pen, touch). Unlike keyboard focus (which can be transferred via Tab ), pointer focus is transient, aggressive, and inherently tied to geometry and z-order.
The critical part is : clear the old focus before notifying it. This prevents the old focus from running code that assumes it still owns pointer events (e.g., trying to release a grab). Accessibility: The Canary in the Coal Mine If you only test pointer focus registration with a mouse, you will ship bugs. pointer focus registration code
The best systems make pointer focus invisible. The worst make it unforgettable. is the exclusive right of a single UI