-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
When I open a draft by double-clicking it, then change my mind and hit Back without typing any text, I am still prompted with this alert:
Save draft?
[Discard] [Save]
This alert should only be shown if the text at the moment I hit Back is different from the text as it was when I first opened the draft.
For the Discard feature to work, you must already be saving the original text when I first open the draft. So this feature should only need one extra if, plus a call to your discard function in the alternative branch. In pseudo-code:
if (textField.currentValue.equals(draftModel.originalValue)) {
discard();
} else {
// show prompt and save or discard as you currently do
}Metadata
Metadata
Assignees
Labels
No labels