Skip to content

Commit

Permalink
focus on modal
Browse files Browse the repository at this point in the history
  • Loading branch information
radek00 committed Jan 5, 2024
1 parent 8f59424 commit f4782ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SecureSend/ClientApp/src/components/ConfirmModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ onMounted(() => {
trapFocus(dialogElement.value!);
});
const trapFocus = (element: HTMLElement) => {
element.focus();
const focusableEls = element.querySelectorAll<HTMLElement>(
'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'
);
Expand Down

0 comments on commit f4782ea

Please sign in to comment.