Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit 13169e3

Browse files
committed
🚸 Automatically focus new modal windows
1 parent f9d083c commit 13169e3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/classes/modal.class.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ class Modal {
105105
}
106106
window.modals[this.id] = this;
107107
document.body.appendChild(element);
108+
this.focus();
108109

109110
// Allow dragging the modal around
110111
let draggedModal = document.getElementById(`modal_${this.id}`);

0 commit comments

Comments
 (0)