diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-01-03 19:01:41 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-01-03 19:01:41 +0100 |
commit | a02c721c4d8ba3c342fcb317f5c779a076571fa4 (patch) | |
tree | 2bb206f9cdc6c82f1379301d10df08f6cfab23fa /components/package/contents/ui/WebView.qml | |
parent | eef9b8725637f448f9f10ba9851f49c9df4bfe6f (diff) | |
download | kube-a02c721c4d8ba3c342fcb317f5c779a076571fa4.tar.gz kube-a02c721c4d8ba3c342fcb317f5c779a076571fa4.zip |
Intercept link clicks and try to open an external browser.
Diffstat (limited to 'components/package/contents/ui/WebView.qml')
-rw-r--r-- | components/package/contents/ui/WebView.qml | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/components/package/contents/ui/WebView.qml b/components/package/contents/ui/WebView.qml index bb6a8df7..a71b42af 100644 --- a/components/package/contents/ui/WebView.qml +++ b/components/package/contents/ui/WebView.qml | |||
@@ -31,11 +31,20 @@ Item { | |||
31 | console.warn("Error is ", loadRequest.errorString); | 31 | console.warn("Error is ", loadRequest.errorString); |
32 | console.warn("Status is ", loadRequest.status); | 32 | console.warn("Status is ", loadRequest.status); |
33 | } | 33 | } |
34 | Component.onCompleted: loadHtml(content, "file:///") | 34 | Component.onCompleted: { |
35 | loadHtml(content, "file:///") | ||
36 | } | ||
35 | onContentsSizeChanged: { | 37 | onContentsSizeChanged: { |
36 | root.contentWidth = contentsSize.width | 38 | root.contentWidth = contentsSize.width |
37 | root.contentHeight = contentsSize.height | 39 | root.contentHeight = contentsSize.height |
38 | } | 40 | } |
41 | activeFocusOnPress: false | ||
42 | settings { | ||
43 | autoLoadImages: true | ||
44 | javascriptCanOpenWindows: false | ||
45 | javascriptEnabled: true | ||
46 | localStorageEnabled: false | ||
47 | } | ||
39 | } | 48 | } |
40 | onContentChanged: { | 49 | onContentChanged: { |
41 | htmlView.loadHtml(content, "file:///"); | 50 | htmlView.loadHtml(content, "file:///"); |