Skip to content

Commit 42898e6

Browse files
committed
(overlay): change validation to focus previous element
1 parent 58c451e commit 42898e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/utils/overlays.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ const restoreElementFocus = async (overlayEl: any) => {
639639
* action sheet) then don't restore focus to
640640
* previous element
641641
*/
642-
if (document.activeElement === null || document.activeElement === document.body) {
642+
if (previousElement) {
643643
previousElement.focus();
644644
}
645645
};

0 commit comments

Comments
 (0)