mirror of https://github.com/vector-im/riot-web
dont format empty ranges
parent
06143ba7a1
commit
f4938f9d11
|
@ -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, "**");
|
||||
|
|
Loading…
Reference in New Issue