diff --git a/SpBlocklyJS/SpeechRecognition_20220729/speechrecognition.js b/SpBlocklyJS/SpeechRecognition_20220729/speechrecognition.js index 9c69e6d796..a3ef71d47a 100644 --- a/SpBlocklyJS/SpeechRecognition_20220729/speechrecognition.js +++ b/SpBlocklyJS/SpeechRecognition_20220729/speechrecognition.js @@ -55,7 +55,7 @@ if ('webkitSpeechRecognition' in window) { document.getElementById("gamespan_recognition").innerHTML = Recognition_final; if (typeof SpeechRecognition_interim === 'object' && SpeechRecognition_interim !== null) { console.log(SpeechRecognition_interim.tagName.toLowerCase()); - if (SpeechRecognition_interim.tagName.toLowerCase()=="text"||SpeechRecognition_interim.tagName.toLowerCase()=="textarea") + if (SpeechRecognition_interim.tagName.toLowerCase()=="input"||SpeechRecognition_interim.tagName.toLowerCase()=="textarea") SpeechRecognition_interim.value = Recognition_final; else SpeechRecognition_interim.innerHTML = Recognition_final; @@ -66,7 +66,7 @@ if ('webkitSpeechRecognition' in window) { Recognition_final = ""; document.getElementById("gamespan_recognition").innerHTML = Recognition_interim; console.log(SpeechRecognition_interim.tagName.toLowerCase()); - if (SpeechRecognition_interim.tagName.toLowerCase()=="text"||SpeechRecognition_interim.tagName.toLowerCase()=="textarea") + if (SpeechRecognition_interim.tagName.toLowerCase()=="input"||SpeechRecognition_interim.tagName.toLowerCase()=="textarea") SpeechRecognition_interim.value = Recognition_interim; else SpeechRecognition_interim.innerHTML = Recognition_interim;