Summary: | [GTK] Add API to handle beforeunload events | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | gustavo, lantw44, mcatanzaro, pnormand, svillar | ||||
Priority: | P2 | Keywords: | Gtk | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Carlos Garcia Campos
2014-11-28 05:47:06 PST
Created attachment 242264 [details]
Patch
Don't forget to set mnemonics on the buttons: "_Stay on Page" and "_Leave Page" seem good. Ping reviewers. I know this is a so annoying web feature, we can add a setting and disable it by default, so that apps need to explicitly enable it if they really want to irritate their users. I think, based on the complaints I've heard from users, we should just have it enabled by default. I don't think many sites take advantage of this to create unnecessary "are you sure you want to leave" messages nowadays, except when the departure would cause some form of data loss (e.g. imgur uploads), and the proper solution to that is to add a "prevent this site from showing additional dialogs" button, anyway. Anyway, I don't see anything to improve about the patch. I suspect that apps are not going to use the try_close() API and will wind up not executing the handlers even if they want to, but that's a consequence of the existing API.... (In reply to comment #4) > I think, based on the complaints I've heard from users, we should just have > it enabled by default. Anyway that doesn't matter for this bug, since you are just adding try_close(); we'll decide how to use it in Epiphany. Comment on attachment 242264 [details]
Patch
LGTM, pretty straight-forward
Committed r193826: <http://trac.webkit.org/changeset/193826> |