[BUG] Note Editor: 'Discard Changes' is shown if 'Don't Keep Activities' is activated
~~This may be related to https://forums.ankiweb.net/t/new-bug-after-the-update/68026~~
It's not. Reproduced in 2.22.3-debug
Next steps:
git bisectto determine when this was introduced (it may be a longstanding bug)
I thought I'd have time today. I don't. Bisecting should be a good first issue
Can I work on this?
@Fandroid745 Sure go ahead. Happy coding!
@Fandroid745 Sure go ahead. Happy coding!
Thanks!
It's not. Reproduced in 2.22.3-debug
Next steps:
git bisectto determine when this was introduced (it may be a longstanding bug)I thought I'd have time today. I don't. Bisecting should be a good first issue
I am unable to reproduce this issue on my phone(Android 15) running 2.23-debug https://github.com/user-attachments/assets/8d5fa920-35dd-46e3-af65-81013f6a5fe2
Interesting, can you bisect to find when it's introduced?
I will look though the recent commits and check if there are any changes in the card editor logic and post them here.
Could you post the output of git bisect
Could you post the output of
git bisect
@david-allison Could you please tell how to do git bisect if I can't reproduce the actual issue on my phone as I don't know which commit would be good before 2.23-debug. should I try testing on tablet emulator instead?
You can't do git bisect if you can't reproduce the issue
a git bisect necessarily relies on your ability to discriminate between a working commit and a non-working commit via reproduction of the issue. It is not possible to do that if you cannot reproduce.
https://discord.com/channels/368267295601983490/701922522836369498/1459924947483758686
- abcfcce8e4b46c5102641d8369bbd7723e922c3d
- #17597
- #17521
abcfcce8e4b46c5102641d8369bbd7723e922c3d is the first bad commit
commit abcfcce8e4b46c5102641d8369bbd7723e922c3d
Author: David Allison <[email protected]>
Date: Sat Dec 14 02:36:54 2024 +0000
fix(note-editor): restore instance state
Now Note Editor is a fragment, it no longer receives
`android:viewHierarchyState`. This is now handled by the Activity
But, we did not need to handle this manually.
Recreating the fields, with the same `id` value restores the text
----
This fix does not handle the loss of focus for dynamic elements
During testing, this lack of focus coming back from 'Drawing'
was jarring. In Production this will have minimal impact
as the user will have lost context by the time the activity is
restored (a user will not have 'Don't keep activities' on).
Fixes 17521
AnkiDroid/src/main/java/com/ichi2/anki/noteeditor/FieldState.kt | 65 +++++++++++++++++++----------------------------------------------
1 file changed, 19 insertions(+), 46 deletions(-)
Hi 👋
I would like to work on this bug.
Can you please assign it to me?
It is already fixed. You can try other issues