Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

voice search - fix

DanielŻuławskibe18e21134dd
diff --git a/src/Web/Grand.Web/Views/Shared/Components/SearchBox/Default.cshtml b/src/Web/Grand.Web/Views/Shared/Components/SearchBox/Default.cshtml
index bce5c73c3..7efac7137 100644
--- a/src/Web/Grand.Web/Views/Shared/Components/SearchBox/Default.cshtml
+++ b/src/Web/Grand.Web/Views/Shared/Components/SearchBox/Default.cshtml
@@ -149,25 +149,25 @@
).then(function (permissionStatus) {
if (permissionStatus.state == "denied") {
- voicenavigator.allowed = false;
+ searchbox.allowed = false;
} else {
- voicenavigator.allowed = true;
+ searchbox.allowed = true;
}
permissionStatus.onchange = function () {
if (this.state == "denied") {
- voicenavigator.allowed = false;
+ searchbox.allowed = false;
} else {
- voicenavigator.allowed = true;
+ searchbox.allowed = true;
}
}
});
} else {
if (navigator.mediaDevices != undefined) {
navigator.mediaDevices.getUserMedia({ audio: true }).then(function (stream) {
- voicenavigator.allowed = true;
+ searchbox.allowed = true;
}).catch(function (err) {
- voicenavigator.allowed = false;
+ searchbox.allowed = false;
})
}
}