Skip to content

Commit

Permalink
Merge pull request #137 from swingingtom/bugfix/keyboard-doesnt-recor…
Browse files Browse the repository at this point in the history
…ds-keys

Prevent direct update of text.content in keyboard example
  • Loading branch information
felixmariotto authored Jan 21, 2022
2 parents 9bd5056 + 5356fae commit 2d49e50
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,11 @@ function makeKeyboard( language ) {
break;

case 'enter' :
userText.set({ content: userText.content += '\n' });
userText.set({ content: userText.content + '\n' });
break;

case 'space' :
userText.set({ content: userText.content += ' ' });
userText.set({ content: userText.content + ' ' });
break;

case 'backspace' :
Expand All @@ -497,7 +497,7 @@ function makeKeyboard( language ) {
// print a glyph, if any
} else if ( key.info.input ) {

userText.set({ content: userText.content += key.info.input });
userText.set({ content: userText.content + key.info.input });

};

Expand Down

0 comments on commit 2d49e50

Please sign in to comment.