3
入力ラジオでフォーカスを設定しようとするとFirefoxで問題が発生しました。以前はタブを使用して前に入力にフォーカスしていない限り、入力にはフォーカスはありません。その後、正しく動作します。誰もそれを解決する方法を知っていますか?少し早いですがお礼を!Firefoxの入力ラジオでのフォーカス()の問題
<!DOCTYPE html>
<html>
<body>
Radio Button: <input type="radio" id="myRadio">
<p>Click the buttons below to give focus and/or remove focus from the radio button.</p>
<button type="button" onclick="getFocus()">Get focus</button>
<button type="button" onclick="loseFocus()">Lose focus</button>
<script>
function getFocus() {
document.getElementById("myRadio").focus();
}
function loseFocus() {
document.getElementById("myRadio").blur();
}
</script>
</body>
</html>
これは、Firefox(v47.0およびV47に私のために働いています.0.1)。唯一のことは強調表示されていません...しかし、「フォーカスを取得」をクリックしてから「バースペース」をクリックすると、ラジオがどのようにチェックされているかがわかります。 – Kamae