johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
6.42k stars 295 forks source link

Cannot open context menu on touchscreen #1400

Open julianfairfax opened 2 months ago

julianfairfax commented 2 months ago

As described in the title, tested on the latest Flatpak version.

I tested this on my PineTab2. Neither a single press, double press, or longpress would open the context menu. The touchpad works.

johnfactotum commented 2 months ago

There isn't a context menu. If you are able to select text you should see a menu upon selection (for touchscreen selection, see #207).

camelCaseNick commented 2 months ago

If you are able to select text you should see a menu upon selection

That does not happen on touchscreens. Text selection is, while not a great experience, somewhat possible via double and triple tap. But the selection menu does not pop up.

johnfactotum commented 2 months ago

Does the menu pop up if you tap on the selected text?

julianfairfax commented 2 months ago

No, it just selects it

johnfactotum commented 2 months ago

I mean if you select some text with double tap, and then tapping on the selected text again.

If you do this too quickly it would be treated as a triple tap. So you need to wait long enough before tapping the third time, which should deselect the text (which is the normal behavior). But in Foliate, in addition to the text being deselected, it would also open the selection menu if it's not already opened (which is actually a bug).

If that does not happen, I would guess that there might be some GTK bug that prevents the popover from showing.

julianfairfax commented 1 month ago

I mean if you select some text with double tap, and then tapping on the selected text again.

That deselects it.

Demetri0 commented 1 month ago

Just in case... do we really need menu to pop up automatically on any selection? May it solve an issue if make menu as a real/honest context menu with a click RMB or long tap?

Just in my own experience - when menu pop up automatically is a bit not comfortable for me... I usually select some part of text before scroll because it helps my eyes to keep position of my reading when I scroll down. But if menu popup is open it blocks scrolling - so I can't do such a useful trick in Foliate.

johnfactotum commented 1 month ago

It probably doesn't have to be that way, but it's such a well-established pattern that it has to be the default even if there's an option to turn it off.

if menu popup is open it blocks scrolling

One can fix this by making the popup non-modal.