Merge pull request #1039 from linuxserver/fix/1038

fix: Enter should open search when not tile search is selected
This commit is contained in:
KodeStar 2022-11-26 12:00:43 +00:00 committed by GitHub
commit f0b60fc19a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
{
"/css/app.css": "/css/app.css?id=9a25947db63214edd4e6f459200dfa62",
"/js/app.js": "/js/app.js?id=6d4db31cf508e4b9c767ec2710c256ff"
"/js/app.js": "/js/app.js?id=b71fe417971ee1aaaaa84e3824221126"
}

View file

@ -11,6 +11,10 @@ const openFirstNonHiddenItem = event => {
return;
}
if (document.querySelector('#search-container select[name=provider]').value !== 'tiles') {
return;
}
const item = document.querySelector('#sortable section.item-container:not([style="display: none;"]) a');
if ('href' in item) {
@ -30,6 +34,5 @@ document.addEventListener('keydown', function (event) {
KEY_BINDINGS[event.key](event);
}
} catch (e) {
}
});