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

[BUG]: Note Editor: Resizing Ankidroid in split screen resets new card content #17521

Open
3 of 4 tasks
Tracked by #17370
Philedor opened this issue Nov 29, 2024 · 6 comments
Open
3 of 4 tasks
Tracked by #17370
Labels
2.19 Needs Triage Note Editor Addition, editing & note type changes Priority-High
Milestone

Comments

@Philedor
Copy link

Checked for duplicates?

  • This issue is not a duplicate

Does it also happen in the desktop version?

  • This bug does not occur in the latest version of Anki Desktop

What are the steps to reproduce this bug?

  1. Open Ankidroid and another application in split screen.
  2. Create a new card and add some content.
  3. Resize the split between the two applications (this can be done manually or automatically when the second application changes).
  4. The new card's content is reset.
  5. https://github.com/user-attachments/assets/70f39ba4-f2c1-40a8-9203-9d12668d3e39

Expected behaviour

The new card's content does not reset.

Debug info

AnkiDroid Version = 2.19.2 (b073f52783583fd4fd1436d986090ced9006a66b)

Backend Version = 0.1.43-anki24.06.3 (24.06.3 d678e39350a2d243242a69f4e22f5192b04398f2)

Android Version = 14 (SDK 34)

ProductFlavor = play

Manufacturer = Xiaomi

Model = 23043RP34G

Hardware = qcom

Webview User Agent = Mozilla/5.0 (Linux; Android 14; 23043RP34G Build/UKQ1.230917.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/131.0.6778.39 Safari/537.36

ACRA UUID = 7adb37c6-c047-4ffb-b558-244d2e2c1a2c

FSRS = 0.6.4 (Enabled: false)

Crash Reports Enabled = true

(Optional) Anything else you want to share?

Thank you guys for doing this! :)

Research

  • I have checked the manual and the FAQ and could not find a solution to my issue
  • (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
Copy link

welcome bot commented Nov 29, 2024

Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing

@mikehardy
Copy link
Member

Thanks for reporting this - probably an activity/fragment lifecycle issue
Anyone looking to triage this: examine Activity methods that deal with the saved instance state Bundle, and same for Fragments involved in this screen

@mikehardy mikehardy added the Note Editor Addition, editing & note type changes label Nov 29, 2024
@david-allison david-allison added this to the 2.19.3 release milestone Nov 29, 2024
@david-allison david-allison changed the title [BUG]: Resizing Ankidroid in split screen resets new card content [BUG]: Note Editor: Resizing Ankidroid in split screen resets new card content Nov 30, 2024
@BrayanDSO
Copy link
Member

In the long term, the Note Editor will be migrated into a WebView page, and the content of one isn't recoverable after a activity is recreated, so using android:configurationChanges="screenSize" is acceptable here IMO.

Saving the state would be the ideal fix, but the work would be temporary.

@mikehardy
Copy link
Member

good point re: moving to webview etc. agree just ignore config change then to see if it works

@david-allison
Copy link
Member

This worked before, I'd like to treat it as a regression and fix it properly

@mikehardy
Copy link
Member

we could but we do only have limited attention - perhaps best served exposing note editor from upstream
but it's open source, anyone can work on anything in reality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.19 Needs Triage Note Editor Addition, editing & note type changes Priority-High
Projects
None yet
Development

No branches or pull requests

4 participants