You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
}
The text was updated successfully, but these errors were encountered:
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:
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:The text was updated successfully, but these errors were encountered: