mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
dont format empty ranges
This commit is contained in:
parent
06143ba7a1
commit
f4938f9d11
1 changed files with 3 additions and 0 deletions
|
@ -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 a new issue