Open Bug 1255131 Opened 8 years ago Updated 2 years ago

Feature request: Prevent accidental tab closure if user has modified something in DevTools

Categories

(DevTools :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: mhoye, Unassigned)

References

Details

(Whiteboard: [btpp-backlog])

If I'm editing a page via devtools and close the tab, I am not prompted to save that work and as far as I can tell I can't recover it.

I'd like to either be notifed that I've asked to close a tab with unsaved changes in it so I can make a decision, or have a way to get that work back.
What kind of changes specifically would you like to be prompted about?

The ones that would be the most annoying to lose I think are CSS changes made in the inspector.  I guess unsaved Style Editor changes too, maybe.

Debugger / console / net monitor / performance are all generally read-only, and markup changes in the inspector would be tough to detect since the page could have made mutations, plus it'd be hard to determine intent if someone wanted to somehow save those back or would be bothered by a prompt.
Flags: needinfo?(mhoye)
"The ones that would be the most annoying to lose I think are CSS changes made in the inspector.  I guess unsaved Style Editor changes too, maybe."

Those are precisely the reason I filed this, though it would be nice if changes made to static content the inspector were flagged as well. "Has an in-Devtools user action modified the content" might be a better question than "has the content been modified."
Flags: needinfo?(mhoye)
The tricky part I think would be to not annoy someone who has no intention to save their changes back.  Sometimes I open the tools on a page to change a CSS property / close a modal / etc because I'm curious how something works or I want to make the page more readable.  In this case getting blocked with an onunload alert wouldn't help.  Any thoughts about how to avoid that?
Severity: normal → enhancement
Priority: -- → P3
Whiteboard: [btpp-backlog]
Product: Firefox → DevTools
See Also: → 1468783
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.