Skip to content

Commit 24e1158

Browse files
author
Elijah
committed
Updated tutorial documentations (#2010)
* Made changes to index.html and room.html templates * Replaced 'keyCode' attribute since it has been deprecated
1 parent fb1b86f commit 24e1158

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/tutorial/part_1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Put the following code in ``chat/templates/chat/index.html``:
175175
<script>
176176
document.querySelector('#room-name-input').focus();
177177
document.querySelector('#room-name-input').onkeyup = function(e) {
178-
if (e.keyCode === 13) { // enter, return
178+
if (e.key === 'Enter') { // enter, return
179179
document.querySelector('#room-name-submit').click();
180180
}
181181
};

docs/tutorial/part_2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Create the view template for the room view in ``chat/templates/chat/room.html``:
6363
6464
document.querySelector('#chat-message-input').focus();
6565
document.querySelector('#chat-message-input').onkeyup = function(e) {
66-
if (e.keyCode === 13) { // enter, return
66+
if (e.key === 'Enter') { // enter, return
6767
document.querySelector('#chat-message-submit').click();
6868
}
6969
};

0 commit comments

Comments
 (0)