TrapFocus assumes if focus is lost , to return it back to the modal. I think this action should only occur if the focus is lost to the body, because of the mutation observe intent is clearly to restore focus if the focused element de-rendered, not if we intentionally move focus elsewhere.
TrapFocus assumes if focus is lost , to return it back to the modal. I think this action should only occur if the focus is lost to the body, because of the mutation observe intent is clearly to restore focus if the focused element de-rendered, not if we intentionally move focus elsewhere.