Anki-android: Touch-gesture actions work unexpectedly when text links are tapped.

Created on 28 Jul 2015  路  15Comments  路  Source: ankidroid/Anki-Android

Originally reported on Google Code with ID 2319

What steps will reproduce the problem?

 -----------------------------------------------------
 1.Set a touch gesture with an action.
  (e.g. "Touch top" with "Mark", "Touch left" with "Edit card ", etc.

 2.Tap a text link on the area of the gesture.
 -----------------------------------------------------

 Then, 
 while the linked content(e.g. Web page, Hint text) is displayed as expected,
 the touch-gesture action works unexpectedly.


What is the expected output? What do you see instead?

 Whereas the linked content is displayed,
 the touch-gesture action doesn't work.


Does it happen again every time you repeat the steps above? Or did it
happen only one time?

 Yes, it happens every time.


What version of AnkiDroid are you using? (Decks list > menu > About > Look
at the title)
On what version of Android? (Home screen > menu > About phone > Android
version)

 2.3beta13


Please provide any additional information below.


Reported by windowopen00 on 2014-10-14 12:02:26

Bug Priority-Medium Stale

Most helpful comment

Wow! Thank you so much!

I havent try it yet because im in 2.10.3 but will try for sure once it releases :D

All 15 comments

Interesting!
Thanks for the feedback.

Reported by nicolas.raoul on 2014-10-15 12:57:58

  • Labels added: Priority-Medium
  • Labels removed: Priority-Undecided

I am having a similar problem: for some cards I have hint fields (which practically work as hyperlinks), and when I tap to show them my answer is also shown (as I had configured the gestures section to show the answer when I tap the card). But, needless to say, I don't want to see the answer before I read the hint and have a chance to recall it.

This is still happening in AnkiDroid 2.9beta10

You cant use tap gesture and hints on a card because it triggers both

Work around: Disable top gesture, which is where link usually are

Bug-related: Okay, i gave it a quick look to see if this was some kind of low hanging fruit bug. Some kind of calling the functions in the wrong order type of thing or just cancelling the gesture if you are following a link

But I think the gestures are a layer above the links on the screen and they are triggered first. I guess you could stop the tap on screen going through to avoid clicking on the link. Although that just make the links stop working

Once you detect the click on the link, the gesture has already being triggered. You should have some kind of state and hold the gesture to trigger when/if no link is triggered

I have no idea how to fix this

I believe this will get worse. https://android-developers.googleblog.com/2019/08/gesture-navigation-backstory.html

I think the way to fix it is to carefully inventory available gesture systems (the system one, then the AnkiDroid one) and available parts of the screen, map out some way to do them compatibly (so gesture areas aren't in conflict, and so gesture start areas aren't in tappable areas) and go from there

It would likely be a breaking change

As a purely personal preference I don't like gesture navigation (I always forget which gesture is what! 馃し鈥嶁檪 ) so I'm not motivated, but that's how I'd decompose it (and how I'd review it, if someone made a PR for it)

Gesture navigation in anki droid is great. Im not so sure about that removing the buttons only gestures google seems to want

I started to use it in anki droid out of the need of using the phone one-handed but i use always now, so mabye i would get used to it, i dont know

In anki droid:

Right = right!
left = opposite of right! wrong!
up = too easy!
down = okay, i got it barely

tap = show the answer
double tap = undo!

The hint use case is easily worked around because hit links are always on the top of the screen, so you can just disable top tap

So i guess this bug is low impact overall, but still annoying

Hello 馃憢, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like _still searching for solutions_ and if you found one, please open a pull request! You have 7 days until this gets closed automatically

still searching for solutions

@voidplayer Fixed in #6205, go to Settings - Gestures on 2.11 to enable. Please reopen if I'm mistaken

Wow! Thank you so much!

I havent try it yet because im in 2.10.3 but will try for sure once it releases :D

Cheers!

2.11 beta will be out shortly. I expect it to be stable, so should be a quick move to 2.11 proper, I don't think we've had one issue in the alpha.

Hi,
Would it be possible to also ignore gestures when done above html buttons? I use them heavily because of the template I use (cf my repo) and it's quite annoying to not be able to tap them rapiddly because it's seen as a double touch.

Thanks!

Hi,
Would it be possible to also ignore gestures when done above html buttons? I use them heavily because of the template I use (cf my repo) and it's quite annoying to not be able to tap them rapiddly because it's seen as a double touch.

Thanks!

@thiswillbeyourgithub I've added an option to the gestures settings page which should have fixed this.

What additional features do you require?

Hi, thanks for the quick response

I use things like <button id="show_button" onclick="revealOneVar();" class="buttonSizeBig">Reveal one</button> in my template. I don't think the option you added covers this use case.

edit : just checked : it doesn't. Ankidroid still thinks I want a gesture when I double tap my html button

Okay, could you add a new issue about the double tap?

Was this page helpful?
0 / 5 - 0 ratings