Skip to content
This repository was archived by the owner on Nov 12, 2020. It is now read-only.
This repository was archived by the owner on Nov 12, 2020. It is now read-only.

getContent returns empty string when fragment isn't added #460

Description

@nbradbury

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.

More details on this bug can be found here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions