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:
Alezia Kurdis 2023-05-11 21:43:40 -04:00 committed by GitHub
parent 0bfdf92647
commit cb4a443920
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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://" &&