Skip to content

Commit

Permalink
Prevent direct update of text.content in keyboard example
Browse files Browse the repository at this point in the history
  • Loading branch information
swingingtom committed Jan 21, 2022
1 parent 3209fc1 commit 5356fae
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 5356fae

Please sign in to comment.