diff options
author | Philip Chimento <philip@endlessm.com> | 2014-02-05 16:58:17 -0200 |
---|---|---|
committer | Philip Chimento <philip@endlessm.com> | 2014-02-05 16:58:17 -0200 |
commit | 57c3cfe030ec7aab0a6e1203145402d1973f4072 (patch) | |
tree | 6383ae7f5c82d2b6cf2781d579c415bbc14a9289 | |
parent | 024886a49afbf4756440a7744548e482e118820b (diff) |
Don't try to open browser-*:// URI schemes locally
Previously, browser-http:// URIs would open as http:// URIs in the
system browser, but the in-app webview would also try to display them
(and fail). This makes sure that the in-app webview ignores the URI
after passing it on to the system browser.
[endlessm/eos-wikipedia-offline#304]
-rw-r--r-- | wikipedia/WikipediaWebView.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wikipedia/WikipediaWebView.js b/wikipedia/WikipediaWebView.js index 4fd6ee6..771a38c 100644 --- a/wikipedia/WikipediaWebView.js +++ b/wikipedia/WikipediaWebView.js @@ -137,13 +137,14 @@ const WikipediaWebView = new Lang.Class({ let suffix = parts[parts.length - 1]; let id = decodeURI(suffix); this.loadArticleById(id); - return true; + decision.ignore(); + return true; // handled } else if (GLib.uri_parse_scheme(uri).startsWith('browser-')) { // Open everything that starts with 'browser-' in the system // browser let realURI = uri.slice('browser-'.length); - printerr('Showing', realURI); Gtk.show_uri(null, realURI, Gdk.CURRENT_TIME); + decision.ignore(); return true; // handled } } |