import * as React from "react" ; import { getActiveElement } from "./getActiveElement" ; import { canUseDOM } from "./canUseDOM" ; const isIE11 = canUseDOM && "msCrypto" in window ; example export function getNextActiveElementOnBlur ( event ) { if ( isIE11 ) { const activeElement = getActiveElement ( event . currentTarget as Element ) ; return activeElement as HTMLElement | null ; } return event . relatedTarget as HTMLElement | null ; }