Close text modal on escape press
I've added an event listner for keydown (key=="Escape") or an escape key press to the textarea in the send text model. That makes it easier for users with special need to interact with the page using a keyboard.
I'm afraid I wasn't able to test the code /host it myself, but I can't see something that could make errors
Over 1000 line changes... 😅
Would it be possible to remove all these white space changes, as the PR is otherwise not really reviewable
Over 1000 line changes... 😅
Would it be possible to remove all these white space changes, as the PR is otherwise not really reviewable
@MoPaMo, for the things I can view, this is a good work, but there are much space changes not required... P.S.: You changed strings write from ' to ", too, that doesn't make much sense.
Sorry that was my formatter 😂
(I will try and undo that)
I've now recopied the code into the old version (sorry for the trouble :joy:)
This does not work in lastest Firefox. The event needs to be 'keydown' instead of 'keypress' in order for the escape key event to be recognized.
To close the About Snapdrop page as well, I added a similar snippet after the animation function (line 658):
// close About Snapdrop page on Escape
window.addEventListener("keydown", (e) => {
if (e.key === "Escape") {
window.location.hash = '#';
}
});