While trying to reproduce a nasty bug where the editor content is lost, I came across this code in the editor.
@Override
public CharSequence getContent() {
if (!isAdded()) {
return "";
}
...
That looks suspiciously like the cause of the problem. I suspect that somehow getContent() is being called when the editor fragment isn't attached, resulting in empty content when the fragment is re-created.
While trying to reproduce a nasty bug where the editor content is lost, I came across this code in the editor.
That looks suspiciously like the cause of the problem. I suspect that somehow
getContent()
is being called when the editor fragment isn't attached, resulting in empty content when the fragment is re-created.More details on this bug can be found here.