Closed Bug 794898 Opened 12 years ago Closed 12 years ago

Scratchpad should ask for confirmation before closing

Categories

(DevTools Graveyard :: Scratchpad, defect, P2)

16 Branch
x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 19

People

(Reporter: mgoodwin, Assigned: anton)

References

()

Details

Attachments

(1 file, 1 obsolete file)

I keep on closing scratchpads by accident and losing stuff.  I'm probably not alone in being clumsy; some kind of "are you sure" prompt could be useful here.
An alternative could be to keep the text in the scratchpad so if you close it, then it will just be there.
The proposed patch makes Scratchpad to act the same way--when closing a dirty editor--no matter if there was a file loaded or not. This means it will ask user to save their work and it will put an asterisk in the title when editor is dirty. I think this change should be pretty intuitive for users accustomed to most text editors.
Assignee: nobody → anton
Status: NEW → ASSIGNED
Attachment #672069 - Flags: review?(fayearthur)
Comment on attachment 672069 [details] [diff] [review]
Trigger promptSave whenever editor is dirty (even without a file)

Review of attachment 672069 [details] [diff] [review]:
-----------------------------------------------------------------

thanks!

::: browser/devtools/scratchpad/test/browser_scratchpad_bug_653427_confirm_close.js
@@ +99,1 @@
>    testUnsavedFileDontSave();

Might just be me, but it took a little bit of time to see what was going on here. Maybe next time add a comment as to why you're calling these twice, or put them them in a new function so it's not repeating.
Attachment #672069 - Flags: review?(fayearthur) → review+
Thanks, I've added a comment. Here's a try build: https://tbpl.mozilla.org/?tree=Try&rev=1f919314d292

I will mark this ticket as ready to land once the build finishes.
Attachment #672069 - Attachment is obsolete: true
Attachment #674045 - Flags: review+
Whiteboard: [land-in-fx-team]
Landed:
https://hg.mozilla.org/integration/fx-team/rev/f25ab1f0fbc3
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Priority: -- → P2
https://hg.mozilla.org/mozilla-central/rev/f25ab1f0fbc3
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 19
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: