bitmagnet-io / bitmagnet

A self-hosted BitTorrent indexer, DHT crawler, content classifier and torrent search engine with web UI, GraphQL API and Servarr stack integration.
https://bitmagnet.io/
MIT License
2.08k stars 80 forks source link

Enter button not recognised in search input on iOS #117

Closed Stuart4 closed 3 months ago

Stuart4 commented 5 months ago

Have you checked the roadmap on the website, and existing issues, before opening a dupllcate issue? Yes

Describe the bug Unable to trigger search query.

To Reproduce

  1. using a mobile iOS device
  2. load the web ui
  3. enter a search term in the search box
  4. press enter

Expected behavior Torrent content should populate as on other devices

General (please complete the following information):

Additional context Same behavior on iPhone.

mgdigital commented 5 months ago

Hi, it seems that pressing enter in the search box doesn't trigger the usual keyup event on iOS.

In general, the app has not been designed for or tested on mobile at all (because most people will be using it on desktop alongside their desktop BitTorrent client). Better mobile support is a medium-term goal but not the highest priority right now so I'll leave this open for the time being.

josteink commented 3 months ago

While its obvious Bitmagnet is not yet designed/optimized for mobile use, this particular bug means it's not actually usable at all.

Like literally cannot use it. Because you will never be able to ... search for anything.

This could probably be fixed very easily by also handling the blur-event on the input-field, and not just responding to enter.

It might be as easy duplicating these lines:

https://github.com/bitmagnet-io/bitmagnet/blob/e9e19a5b0ab43cb976917f44afef09117ce6b1ec/webui/src/app/search/torrent-content/torrent-content.component.html#L99-L102

And adding this:

            (blur)="
              search.setQueryString(queryString.value ?? '');
              search.firstPage();
              search.loadResult()
josteink commented 3 months ago

Another workaround could be to make the refresh button always consider the input-field before issuing the network request.

These should be fairly small changes in code which would make a very big impact (not usable at all on iphones => actually usable).

josteink commented 3 months ago

I've provided a very simplistic workaround for this in the following PR: https://github.com/bitmagnet-io/bitmagnet/pull/235

Tested locally on iPhone and works correctly as far as I see. Review, pretty please?

Also: Happy easter!