Skip to content

Incorrect modification detection when saving drafts #5037

@rrrooommmaaa

Description

@rrrooommmaaa

The failing use case that I saw:

  1. open a new secure compose window
  2. quickly type/paste something into the body before the first draftSave() is activated (SAVE_DRAFT_FREQUENCY = 3000 ms)
  3. the draft will not be saved

This causes some tests to periodically fail (e.g. mail.google.com - saving and rendering compose drafts when offline) and generally bad UX.

Reason: ComposeDraftModule.hasBodyChanged() relies on lastDraftBody property which is initialized as undefined
and it ignores the first updates (returns false)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions