Skip to content

Commit

Permalink
Updated tutorial documentations (#2011)
Browse files Browse the repository at this point in the history
* Made changes to index.html and room.html templates
* Replaced 'keyCode' attribute since it has been deprecated

Closes #2010
  • Loading branch information
learningboiz committed Jun 6, 2023
1 parent dd5b1aa commit d5ff1f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/tutorial/part_1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Put the following code in ``chat/templates/chat/index.html``:
<script>
document.querySelector('#room-name-input').focus();
document.querySelector('#room-name-input').onkeyup = function(e) {
if (e.keyCode === 13) { // enter, return
if (e.key === 'Enter') { // enter, return
document.querySelector('#room-name-submit').click();
}
};
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/part_2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Create the view template for the room view in ``chat/templates/chat/room.html``:
document.querySelector('#chat-message-input').focus();
document.querySelector('#chat-message-input').onkeyup = function(e) {
if (e.keyCode === 13) { // enter, return
if (e.key === 'Enter') { // enter, return
document.querySelector('#chat-message-submit').click();
}
};
Expand Down

0 comments on commit d5ff1f4

Please sign in to comment.