-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web Interface - Context Menu From Touch Devices #464
Comments
It seems that when the contextmenu was implemented, they expected to use the "taphold" menu(per the "taphold: true" in transmission.js), but that library has not been included |
I'm very interested in this too, I tried adding the taphold.js library to the website, however it does not appear to work on touch devices for me--it worked fine on desktop browsers. It will likely need some debugging to make it work with the torrent rows. When I have some spare time I will start work on this. |
I've got a rudimentary working version. The context menu appears when pressing on a torrent in the list for 0.75 seconds. This in it's current state is kind of a workaround though, it needs to be cleaned up, the code put in the correct places, and more testing is needed to find bugs. I will do all of this and eventually when it is ready I will make a PR. There is already one noticable bug which is that it seems it doesn't work if I press on the bottom right part of the torrent row. Any testing/bugs feedback would be appreciated. Note: this does not require or use the Added this to
Add this to common.css (to stop the text being highlighted instead of the tap and hold effect):
And last, If you use it please provide feedback! |
Thanks for the work @sebastian-king! I hate to have to add our own event listeners, but if contextmenu.js isn't handling it properly then this looks nice to me. "var taphold" and "var timer" might be better named "var isTouchStarted" and "var timerLongTouch", or something else more descriptive. I'm sure you understand the transmission web code better than I. Would you put the 2 functions(on 'touchstart' and on 'touchend') into functions on the transmission.js class? This would let you put only 2 calls into main.js. I suppose they would look like:
|
taphold.js from https://cdn.jsdelivr.net/npm/ui-contextmenu@1.18.1/lib/jquery-taphold/taphold.js; taphold.min.js from https://cdn.jsdelivr.net/npm/ui-contextmenu@1.18.1/lib/jquery-taphold/taphold.min.js (messaged comment to include author and license). Fixes transmission#464.
taphold.js from https://cdn.jsdelivr.net/npm/ui-contextmenu@1.18.1/lib/jquery-taphold/taphold.js; taphold.min.js from https://cdn.jsdelivr.net/npm/ui-contextmenu@1.18.1/lib/jquery-taphold/taphold.min.js (massaged comment to include author and license). Fixes transmission#464.
I ran into this myself on my iPad just now. Contrary to @sebastian-king's experience, I added https://cdn.jsdelivr.net/npm/ui-contextmenu@1.18.1/lib/jquery-taphold/taphold.js and it immediately worked, not sure if he was using a bad version or had an incompatible browser. Anyway, I submitted #774. Not really expecting it to be merged, but hopefully it may help someone else. |
Thanks @zmwangx transmission/transmission#774 transmission/transmission#464 Implements a tap and hold functionality. Click/tap and hold for 1s (default) triggers taphold event. Click/tap and release triggers normal click event.
Thanks @zmwangx transmission/transmission#774 transmission/transmission#464 Implements a tap and hold functionality. Click/tap and hold for 1s (default) triggers taphold event. Click/tap and release triggers normal click event.
Hello everyone. |
Hi! Same here. Cannot open the context menu from mobile Safari. It just starts to highlight text and progress bars. So I'm unable to verify or trash local data… Hoping for a fix? |
The web client refresh in #1476 fixes this. It will be included in the next stable release and is available now in the nightly builds. |
To confirm, am I supposed to be able to bring up a context menu to change folders or similar from iOS Safari on an iPad or iPhone? |
Should be able to, yeah |
This works on my Android phone. In Chrome browser, I’m able to long press on an item, and I get the context menu. However, on my iPad, in Safari, the long press only selects text and the progress bars. Running 4.0.2. |
Can confirm that pressing and holding on an item does not bring up a context menu at all. Neither does pressing and holding on a button. |
@cwanja what browser, operating system, and version of Transmission are you using? |
@slokhorst iOS 16.5, Safari, 3.0. Transmission runs on an Ubuntu host. |
It seems like the new implementation uses the So, in order to get this working on (the current) Safari on iOS, a workaround would need to be implemented. |
I cannot find any reference to this in open issues. Is this being worked on and am I missing something or should I open a new issue? |
It never worked in iPadOS/iOS. I'm waiting for #5827 to ship then there'll be another PR focused on bringing context menu to touch devices featuring iPad and iPhone. |
I often use the "Trash Data and Remove From List" option in the context menu from the web interface. I cannot get the context menu to work from my phone.
It might be possible to upgrade to the newest contextmenu version to solve this. Otherwise I would vote to add listeners for touch events.
An alternative might be adding the same options in the info pane somewhere.
Has anyone else found this to be an issue?
The text was updated successfully, but these errors were encountered: