Ticket #3507 (closed defect: fixed)

Opened 13 months ago

Last modified 13 months ago

Browse: handle hiperlinks that open new windows

Reported by: manuq Owned by: manuq
Priority: Normal Milestone: 0.96
Component: Browse Version: Git as of bugdate
Severity: Unspecified Keywords: 12.1.0
Cc: erikos Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

Open the ones that are wanted in a new tab, like anchors with target="_blank" attribute. Test page:

 http://dev.laptop.org/~erikos/wanted.html

And block the ones that do pop-up via javascript. Test page:

 http://dev.laptop.org/~erikos/unwanted.html

Change History

Changed 13 months ago by manuq

Looking at webview signals "new-window-policy-decision-requested" and "create-web-view", and epiphany src/ephy-window.c which have callbacks for them.

Changed 13 months ago by manuq

Patch sent to the mailing list. Both test cases pass.

Please pay attention to the patch comment regarding the "reason", shall we do any exception, that is, any new window request that should be blocked?

Here is a list of all the reasons:

 http://webkitgtk.org/reference/webkitgtk/1.8.0/WebKitWebNavigationAction.html#WebKitWebNavigationReason

Changed 13 months ago by manuq

We may also find useful this signals the WebView provides: script-alert, script-confirm, script-prompt. Maybe catch them and use our Sugar Alert instead of pop-ups?

Changed 13 months ago by manuq

  • status changed from new to closed
  • resolution set to fixed

Pushed as 022ef0dd9791af51d7b9de38e813096f2ca60948 .

Note: See TracTickets for help on using tickets.