Android back button exits editor without saving changes in Nextcloud Text
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
### ⚠️ Before posting ⚠️
- [x] This is a **bug**, not a question or an enhancement.
- [x] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [x] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Steps to reproduce
1. Open a Markdown or text document in Nextcloud Text on an Android device.
2. Edit the document.
3. Press the **Android system back button** to leave the editor.
### Expected behaviour
Pressing the Android back button should either:
* Trigger the same save-and-close behavior as the editor **“X” close button**, or
* Show a warning dialog indicating that there are unsaved changes.
Ideally, the back button should behave consistently with the editor UI close action.
### Actual behaviour
* The editor closes immediately when pressing back button.
* Recent edits are not always saved and file mtime doesn't change ever.
* No warning about unsaved changes is shown.
* The document reopens sometimes with the correct content and other times with the previous content.
* Using the **“X” close button** correctly saves the document.
### Android version
16
### Device brand and model
Samsung S24 Exynos
### Stock or custom OS?
Stock
### Nextcloud android app version
33.0.1
### Nextcloud server version
32.0.16
### Using a reverse proxy?
No
### Android logs
_No response_
### Server error logs
```bash
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.