Scratchpad doesn't show confirmation dialog after opening a file

RESOLVED FIXED in Firefox 19

Status

()

Firefox
Developer Tools: Scratchpad
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: anton, Assigned: anton)

Tracking

Trunk
Firefox 19
x86_64
All
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

5 years ago
How to reproduce:

 * Open Scratchpad
 * Load a new file
 * Change its contents
 * Try closing Scratchpad by clicking on X (not a menu item)

Expected result: a dialog asking you to save changes.
Actual result: Scratchpad closes and your changes are lost.
(Assignee)

Comment 1

5 years ago
Created attachment 671694 [details] [diff] [review]
Removed _skipClosePrompt line and added a regression test
Assignee: nobody → anton
Status: NEW → ASSIGNED
Attachment #671694 - Flags: review?(fayearthur)
(Assignee)

Comment 2

5 years ago
Created attachment 672061 [details] [diff] [review]
Removed all _skipClosePrompt instances and added a regression test

Heather (correctly) noticed that we don't need _skipClosePrompt at all since window.close doesn't trigger a "close" event. I tested manually and run all Scratchpad tests (on Ubuntu).
Attachment #671694 - Attachment is obsolete: true
Attachment #671694 - Flags: review?(fayearthur)
Attachment #672061 - Flags: review?(fayearthur)
Attachment #672061 - Flags: review?(fayearthur) → review+
(Assignee)

Updated

5 years ago
Whiteboard: [land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/0c63519f8e41
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Backed out for failing scratchpad test on Win XP debug:

https://hg.mozilla.org/integration/fx-team/rev/f39343285fc1
(Assignee)

Updated

5 years ago
Whiteboard: [fixed-in-fx-team]
(Assignee)

Comment 5

5 years ago
Created attachment 672879 [details] [diff] [review]
Removed all _skipClosePrompt instances and added a regression test

Updated patch to prevent potential race condition when testing |Scratchpad.onClose|. This method now accepts an optional callback, just like |Scratchpad.close|.

Try build for this patch: https://tbpl.mozilla.org/?tree=Try&rev=f5a74664ba5f (no related oranges).
Attachment #672061 - Attachment is obsolete: true
Attachment #672879 - Flags: review?(fayearthur)
Comment on attachment 672879 [details] [diff] [review]
Removed all _skipClosePrompt instances and added a regression test

Looks good, I like the code removal.
Attachment #672879 - Flags: review?(fayearthur) → review+
(Assignee)

Updated

5 years ago
Whiteboard: [land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/4067355bbc56
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/4067355bbc56
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 19
You need to log in before you can comment on or make changes to this bug.