Skip to content

Commit

Permalink
adding another method for maintaining focus, commenting out as just f…
Browse files Browse the repository at this point in the history
…or reference
  • Loading branch information
Dennis Lembree committed Dec 13, 2017
1 parent 59e7724 commit cbfc2dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modal/modal_demo2.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,16 @@ <h2>More</h2>
}
}
});

// Another method for maintaining focus via https://www.nczonline.net/blog/2013/02/12/making-an-accessible-dialog-box/
// document.addEventListener("focus", function(event) {
// var dialog = document.getElementById("search");
// if (document.getElementById("query").style.display != "none" && !dialog.contains(event.target)) {
// event.stopPropagation();
// document.getElementById("query").focus();
// }
// }, true);

</script>

</body>
Expand Down

0 comments on commit cbfc2dd

Please sign in to comment.