Closed Bug 351432 Opened 18 years ago Closed 6 years ago

Warn when attempting to close the window and comment field is not empty (like gmail and other web apps)

Categories

(Bugzilla :: User Interface, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: moco, Unassigned)

References

Details

Attachments

(1 file, 1 obsolete file)

[rfe] prompt me if I attempt to close and the comment are is non-empty (like gmail and other web apps) when using gmail, if I go to compose a message, and then I attempt to close the browser window, close the tab, or quit the browser, I get prompted so that I can cancel the close / quit. do you think it would be useful to add something like this to bugzilla? (I just lost a big comment, having accidentally hit cmd q)
How hard is it to catch such actions (closing the window/browser)?
Severity: normal → enhancement
OS: Mac OS X 10.3 → All
Hardware: PC → All
Summary: [rfe] prompt me if I attempt to close and the comment are is non-empty (like gmail and other web apps) → Prompt me if I attempt to close and the comment is non-empty (like gmail and other web apps)
Summary: Prompt me if I attempt to close and the comment is non-empty (like gmail and other web apps) → Warn when attempting to close the window and comment field is not empty (like gmail and other web apps)
taking.
Assignee: ui → gandalf
Status: NEW → ASSIGNED
Attached patch patch v1 (obsolete) — Splinter Review
This patch works on create field and edit field. We can raise the number of chars in textarea before we display the message
Attachment #236863 - Flags: review?(LpSolit)
Comment on attachment 236863 [details] [diff] [review] patch v1 Please write your JS code in a separate file in the js/ directory, e.g. js/comments.js (or a better file name is fine too). Also, it would be fine to explain to the user why he gets this message, e.g.: "You started writing a comment. Do you really want to close this window and loose your changes?", else he will have no clue about what is going on. And finally, it would be fine to display this msg too when editing an attachment (the comment field on the left).
Attachment #236863 - Flags: review?(LpSolit) → review-
Pretty please, gandalf, wanna revive the patch? :-) I just lost a huge comment by accidently clicking the window. This would be so useful.
Attached patch patch v2Splinter Review
ok, patch updated to trunk. What I need is a way to outsource the message to the template, to make it localizable. LpSolit?
Attachment #236863 - Attachment is obsolete: true
Attachment #277295 - Flags: review?(LpSolit)
Comment on attachment 277295 [details] [diff] [review] patch v2 >+++ ./js/comments.js 2007-08-19 18:02:25.000000000 +0200 >+function onPageUnload () { >+ var msg="You started writing a comment. Do you really want to close this window and loose your changes?"; This string should be passed to the JS script from the template so that you can translate it. For JS code review, ask myk or wicked. They are better reviewers than me in this area.
Attachment #277295 - Flags: review?(LpSolit) → review-
Duplicate of bug 48333 it seems. I still find this behavior in FF 3.0.11.
See Also: → 48333
Assignee: gandalf → ui
Status: ASSIGNED → NEW

Bugzilla 6.0 based on BMO will store draft comments in the local storage for later use, so no warning is required.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: