aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/mist')
-rw-r--r--cmd/mist/assets/qml/views/browser.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/mist/assets/qml/views/browser.qml b/cmd/mist/assets/qml/views/browser.qml
index ff3ff0f7f..a6f4e3d92 100644
--- a/cmd/mist/assets/qml/views/browser.qml
+++ b/cmd/mist/assets/qml/views/browser.qml
@@ -238,7 +238,12 @@ Rectangle {
z: 20
activeFocusOnPress: true
Keys.onReturnPressed: {
- webview.url = this.text;
+ // if there's no http, add it.
+ var url = this.text,
+ matches = url.match(/^([a-z]*\:\/\/)?([^\/.]+)(:?\/)(.*|$)/i),
+ requestedProtocol = (matches && matches[1] != "undefined")? "" : "http://";
+
+ webview.url = requestedProtocol + url;
}
}