mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-28 21:01:16 +02:00
Places App: Enter to teleport
This PR add the possibility to press "Enter" to initiate a teleportation from the value in the search/address bar of the Places App. (In addition to the current teleport button) This is a more intuitive behaviour since everyone is used to this in the web browsers.
This commit is contained in:
parent
0bfdf92647
commit
cb4a443920
1 changed files with 13 additions and 7 deletions
|
@ -669,6 +669,12 @@
|
|||
generateContent();
|
||||
}
|
||||
|
||||
document.addEventListener("keyup", function(event) {
|
||||
if (event.keyCode === 13) {
|
||||
teleportUsingAddressBarValue(document.getElementById("search").value);
|
||||
}
|
||||
});
|
||||
|
||||
function teleportUsingAddressBarValue(url) {
|
||||
var finalizedUrl = url;
|
||||
if (url.substr(0, 7).toLocaleLowerCase() !== "http://" &&
|
||||
|
|
Loading…
Reference in a new issue