diff --git a/src/components/views/rooms/BasicMessageComposer.js b/src/components/views/rooms/BasicMessageComposer.js index 3d2b96f773..36e142c0ea 100644 --- a/src/components/views/rooms/BasicMessageComposer.js +++ b/src/components/views/rooms/BasicMessageComposer.js @@ -434,6 +434,9 @@ export default class BasicMessageEditor extends React.Component { this._editorRef, this.props.model, document.getSelection()); + if (range.length === 0) { + return; + } switch (action) { case "bold": formatInline(range, "**");