Fix input autofocus under Vue.js v2.6
This commit is contained in:
parent
37ad4c0c99
commit
aa8f5ef4e9
@ -257,6 +257,9 @@ var vm = new Vue({
|
||||
this.opponentScore = 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
document.getElementById('nicknameInput').focus();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
<div class="body row nofooter">
|
||||
<div v-show="!username" class="form">
|
||||
<h2>What is your name?</h2>
|
||||
<input id="nicknameInput" type="text" class="form-control" maxlength="16" autofocus>
|
||||
<input id="nicknameInput" type="text" class="form-control" maxlength="16">
|
||||
<p class="error-message">{{ usernameError }}</p>
|
||||
</div>
|
||||
<div v-show="username">
|
||||
|
Loading…
x
Reference in New Issue
Block a user