Please sign in to comment.
Check to ensure focus has intentionally left the wrapped component in…
… `withFocusOutside` HOC (#17051) * Adds check to determine whether event occured within element trapping focus Previously there was no check to see whether the blur event occured within the wrapped component. If it occurs within then we do not want to trigger the `handleFocusOutside` callback because (by definition) the focus has not moved outside the wrapped element. This may have been a regression introduced in #16878 * Fix handling blur event when document is not actually focused Previously we fixed the wrong problem. The actual issue is that previously we were handling document blur events as true “focus outside” events when in fact they should be ignored as if the document is not focused then presumably the user did not intent the blur. * Update to test for document loss of focus scenario
- Loading branch information...
Showing with 32 additions and 0 deletions.