forked from CringeStudios/gamja
Fix TypeError in Composer.focus
Uncaught (in promise) TypeError: this.textInput.current is null
This commit is contained in:
parent
c9b07efc9c
commit
2941dc0076
@ -71,6 +71,9 @@ export default class Composer extends Component {
|
||||
}
|
||||
|
||||
focus() {
|
||||
if (!this.textInput.current) {
|
||||
return;
|
||||
}
|
||||
document.activeElement.blur(); // in case we're read-only
|
||||
this.textInput.current.focus();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user