Add autofocus
This commit is contained in:
parent
5fdbde912b
commit
bab5bc8318
@ -53,7 +53,7 @@
|
||||
<ul id="messages">
|
||||
<li><b>Rappel:</b> Tous les messages doivent parler de Denis !</li>
|
||||
</ul>
|
||||
<input id="message-input" type="text" placeholder="Écrivez votre message sur Denis ici...">
|
||||
<input id="message-input" type="text" placeholder="Écrivez votre message sur Denis ici..." autofocus>
|
||||
<img id="send" src="./images/send.png">
|
||||
<img id="close" src="./images/cross.png">
|
||||
</div>
|
||||
|
@ -65,6 +65,7 @@ const swiper = new Swiper('.swiper', {
|
||||
|
||||
document.getElementById("chat-button").addEventListener("click", () => {
|
||||
document.getElementById("chat").style.display = "block";
|
||||
document.getElementById("message-input").focus();
|
||||
});
|
||||
|
||||
document.getElementById("close").addEventListener("click", () => {
|
||||
|
Loading…
Reference in New Issue
Block a user