Skip to content

Commit

Permalink
fix keyboard focus behavior on modal interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnickii committed May 27, 2024
1 parent b42c743 commit 711f7f5
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,15 @@ const closeModal = document.getElementById("close-modal")
const modalContent = document.getElementById("modal-content")
const modalPicker = document.getElementById("modal-picker")
modal.addEventListener('click', () => {
modalContent.style.display = "flex"
modalPicker.selectedPeople = []
modalContent.style.display = "flex"
modalPicker.selectedPeople = []
const input = modalPicker.shadowRoot.querySelector('fluent-text-field').shadowRoot.querySelector('input');
input.focus();
})
closeModal.addEventListener('click', () => {
modalContent.style.display = "none"
modalContent.style.display = "none";
modal.focus();
})
</script>
`;
Expand Down

0 comments on commit 711f7f5

Please sign in to comment.