jcorporation / myMPD

myMPD is a standalone and mobile friendly web mpd client with a tiny footprint and advanced features.
https://jcorporation.github.io/myMPD/
GNU General Public License v3.0
398 stars 62 forks source link

Album Filtering - Android (Firefox, Chrome) #1220

Closed GK-774 closed 4 months ago

GK-774 commented 4 months ago

myMPD 14.0.3

In the album view (Browse/Album) one can type a search term and the view gets immidiatly filtered as you type and/or one may hit Enter and add the next search term. This works with all desktop browsers I have tried (Firefox, Edge), it works on an Ipad (Firefox, Safari) and iPhone (Safari).

For some reason it does not work on three Android devices (one tablet, two phones) I tried: With Firefox I do not get "search/filter" as you type but get some result when I add a blank at the end. With Chrome there is no search or filter function at all.

jcorporation commented 4 months ago

It seems to be an android/chrome bug: https://stackoverflow.com/questions/17974021/keyup-not-working-on-chrome-on-android

Pressing enter works?

john- commented 4 months ago

Looks like I see the same behavior. Pressing enter to add the search term adds the term but does not execute the search. I need to press enter by itself in the search box in order for the results to be filtered.

GK-774 commented 4 months ago

Enter works in the sense that it moves the search term to the area below but no filtering action takes place.

GK-774 commented 4 months ago

It looks like the android/chrome bug, yes, more android though, because with Firefox on Android behaviour is the same. Is there a browser for Android one could try?

Emilot commented 4 months ago

It happens to Firefox too. No search...

john- commented 4 months ago

In my experience on Android:

However, if you hit enter in the search box after submitting a search term the filtered results appear.

jcorporation commented 4 months ago

Unfortunately I have no access to an android device for testing.

Please go to https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key and test some normal and special keys and enter.

john- commented 4 months ago

For basic test I typed only the letter s in each case.

Firefox on linux laptop

Key "s" pressed [event: keydown]
Key "s" about to be input [event: beforeinput]
Key "s" input [event: input]
Key "s" released [event: keyup]

Android 13 phone using Chrome:

Key "Unidentified" pressed [event: keydown]
Key "s" about to be input [event: beforeinput]
Key "s" input [event: input]
Key "Unidentified" released [event: keyup] 

That seems pretty messed up so it would be good if someone else can verify.

GK-774 commented 4 months ago

I can confirm the results that John got. Firefox on iPad same result as Firefox on linux laptop, DuckDuckGo, Edge and Chrome on LineageOS 20 (Android 13) same result as Android 13 phone using Chrome.

jcorporation commented 4 months ago

Please test the Enter key also.

john- commented 4 months ago

Enter key...

Firefox on Linux:

Key "Enter" pressed [event: keydown]
Key "null" about to be input [event: beforeinput]
Key "null" input [event: input]
Key "Enter" released [event: keyup]

Android 13 phone using Chrome:

Key "Unidentified" pressed [event: keydown]
Key "Unidentified" released [event: keyup]
Key "Enter" pressed [event: keydown]
Key "null" about to be input [event: beforeinput]
Key "null" input [event: input]
Key "Enter" released [event: keyup] 
jcorporation commented 4 months ago

Thanks. Search on type could not work, but pressing enter for search should work with some adjustments.

jcorporation commented 4 months ago

Above commit disables search on type for Android and improves the Enter-key-handling. Can someone test the devel branch with Android?

john- commented 4 months ago

I tested on Firefox/Linux and Chrome/Android. Firefox/linux continues to work as expected (no regression)

With Chrome, adding search terms works as expected (no search on type, enter key adds search term and filters the results).

However, when removing a search term with the x the search results do not update to show no filtering. Furthermore, the removed search term pops back into the search box. Selecting the x to the right of the search box clears the text.

I can provide a screen shot if that helps.

On desktop, removal continues to work as expected.

jcorporation commented 4 months ago

Pleas test again.

john- commented 4 months ago

I am getting inconsistent results and trying to rule out caching or some kind of user error. I say this because some times removal works as expected (removes search term and updates results) and other times it does not (pops the search term back to the search box and does not update the search results).

I have not figured out a pattern and need to step away from the computer. Hopefully others can look at this otherwise I will try later.

Update: This looks like user error. I am missing the x and selecting the label in general. I will think others should take a look at this but it is probably working as expected.

GK-774 commented 4 months ago

I can confirm normal operation on an Laptop (Firefox and Edge), I will test on two Android devices this evening and report back.

GK-774 commented 4 months ago

Yes, :-) looks good. With Android Phone and Tablet I get the correct filtering action after Enter, clearing it with the „x“ button returns to the view before. I would say, it’s resolved.