Skip to content
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

Tap on Forgetting Curve Moves Page Up #17546

Open
brishtibheja opened this issue Dec 4, 2024 · 2 comments
Open

Tap on Forgetting Curve Moves Page Up #17546

brishtibheja opened this issue Dec 4, 2024 · 2 comments
Labels
2.20 Reproduced This bug has been reproduced by a maintainer upstream-issue

Comments

@brishtibheja
Copy link

brishtibheja commented Dec 4, 2024

Steps

  1. Open card info for any card.
  2. Scroll down to forgetting curve.
  3. Tap on it.

Behaviour

The page moves up when you do that similar to #17276.

Debug

AnkiDroid Version = 2.20.0beta1 (44f54758e8095b3dd13576c06f90f5a2aaed4d72)

Backend Version = 0.1.48-anki24.11 (24.11 c47638ca36f99dd4f3b81ae82d964aec66e392e0)

Android Version = 11 (SDK 30)

ProductFlavor = full

Manufacturer = realme

Model = RMX2193

Hardware = mt6768

Webview User Agent = Mozilla/5.0 (Linux; Android 11; RMX2193 Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.107 Mobile Safari/537.36

ACRA UUID = cf265e01-9693-407f-984d-61ddf9698fac

FSRS = 1.4.3 (Enabled: true)

Crash Reports Enabled = true

I wasn't sure where to post this so if it needs be reported in anki's repo, happy to do that.

@david-allison
Copy link
Member

david-allison commented Dec 4, 2024

Report upstream & link back here please. Feel free to use any of this comment

https://github.com/ankitects/anki/blob/f6a3e98ac3dcb19d54e7fdbba96bf2fa15fc2b3f/ts/routes/card-info/forgetting-curve.ts#L255

const [x1, y1] = pointer(event, document.body);
// ...
showTooltip(tooltipText(d), x1, y1);

https://github.com/ankitects/anki/blob/f6a3e98ac3dcb19d54e7fdbba96bf2fa15fc2b3f/ts/routes/card-info/forgetting-curve.ts#L239-L260

https://github.com/ankitects/anki/blob/f6a3e98ac3dcb19d54e7fdbba96bf2fa15fc2b3f/ts/routes/graphs/Tooltip.svelte

Potential Issues (I don't know Svelte):

  • I believe mounting the Tooltip causes the scroll to the top (not confirmed)
    • On the first click, the tooltip is created, rather than showing it unconditionally and keeping it at 0 opacity (as is done after it's dismissed for the first time)
  • Tooltip.svelte only appears to have code for avoiding the border in the X direction, not the Y direction
  • mousemove and mouseout should probably have touchscreen alternatives

@OuOu2021
Copy link

OuOu2021 commented Dec 19, 2024

Potential Issues (I don't know Svelte):

  • I believe mounting the Tooltip causes the scroll to the top (not confirmed)

    • On the first click, the tooltip is created, rather than showing it unconditionally and keeping it at 0 opacity (as is done after it's dismissed for the first time)
  • Tooltip.svelte only appears to have code for avoiding the border in the X direction, not the Y direction

  • mousemove and mouseout should probably have touchscreen alternatives

@david-allison
I also noticed that it's not just the first tap that causes the "scrolls to top" issue. Even after that, if I tap on the left of the Forgetting Curve first, then tap on the right, the same issue occurs. So, this problem should not be related to mounting.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.20 Reproduced This bug has been reproduced by a maintainer upstream-issue
Projects
None yet
Development

No branches or pull requests

3 participants