Merge pull request #145 from Serraniel/bugfix/#143-quicksearch-hotkey-triggers-when-watch2gether-chat-is-focused

#143 Prevent quicksearch hotkey if document.activeElement is a textarea
This commit is contained in:
Daniel 2020-12-13 16:09:21 +01:00 committed by GitHub
commit e067c0cb00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,7 +70,7 @@ function handleQuickSearch(event) {
function handleSearchForShiftF(event) {
if (helper.isShiftPressed) {
// check if some kind of input is focused already; we then prevent our hotkey
if (document.activeElement instanceof HTMLInputElement || document.activeElement.isContentEditable) {
if (document.activeElement instanceof HTMLInputElement || document.activeElement instanceof HTMLTextAreaElement || document.activeElement.isContentEditable) {
return;
}