fixed context menu long press open

This commit is contained in:
Andreas Fruhwirt
2025-04-05 19:29:54 +02:00
parent 3943a8bc7c
commit 3db9ce34f5
2 changed files with 18 additions and 11 deletions
+7
View File
@@ -11,6 +11,13 @@ window.addEventListener("load", async (event) => {
await navigator.mediaDevices.getUserMedia({ audio: true });
});
document.getElementById('recordbuttonimage').oncontextmenu = function(event) {
event.preventDefault();
event.stopPropagation(); // not necessary in my case, could leave in case stopImmediateProp isn't available?
event.stopImmediatePropagation();
return false;
};
function startButtonPulse(analyser) {
const button = document.querySelector('#recordbutton');