diff --git a/src/react-components/ui-root.js b/src/react-components/ui-root.js index 77622b57f991eefa0f83fd80271c9ec475cee1f4..7a3987d2bb15f8b8dfa6ec8fafcdbac88d8478c4 100644 --- a/src/react-components/ui-root.js +++ b/src/react-components/ui-root.js @@ -1070,8 +1070,12 @@ class UIRoot extends Component { <button className={classNames([styles.messageEntrySpawn])} onClick={() => { - spawnChatMessage(this.state.pendingMessage); - this.setState({ pendingMessage: "" }); + if (this.state.pendingMessage.length > 0) { + spawnChatMessage(this.state.pendingMessage); + this.setState({ pendingMessage: "" }); + } else { + this.showCreateObjectDialog(); + } }} /> </div>