Data loss when switching away from app while the focus is still on file property on Android

Steps to reproduce

  1. Create a new note
  2. Add file property
  3. Type some value into the property
  4. Keep the focus in the value, and switch to another app
  5. Swipe close the Obsidian app in the background (or just wait long enough to allow system to close it automatically)
  6. Open the Obsidian app again

Did you follow the troubleshooting guide? [Y/N]

Yes, I tested in a vault without any plugin and with default theme.

Expected result

The value written into the property should be preserved, just like if I put some content in the main note and switch away.

Actual result

The value in the property gets disappeared.

Environment

SYSTEM INFO:
	Operating system: android 16 (Sony XQ-EC72)
	Webview version: 144.0.7559.132
	Obsidian version: 1.11.7 (287)
	API version: v1.11.7
	Login status: not logged in
	Language: en
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

The problem is not switching away from the app, the problem is that you (or the OS) closes the app while you are still editing the value.

If the cursor is still there, we think that you are still editing but you have not committed to any changes (so no change has been saved to disk).

I don’t consider this bug, but I am open to suggestions. Please, open a thread in Feature Requests if you have any idea.

1 Like

My observation is that if I do this in the main note body, it isn’t a problem. The focused paragraph still gets saved wherever I stop and switch. So I naturally expect this to apply to properties. I suppose the app has a chance to save everything when user switches app. I haven’t observed data loss on main body for this reason, and it’s specific to the property.

If property is somehow special on that it has to save after the editing finishes, it might be better to make it less like note body, but use some different UI, e.g. a modal popup or something indicating the value is not yet in the file and you switch at your own risk of losing anything you put there.