You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-19 05:22:13 +03:00
dont format empty ranges
This commit is contained in:
@@ -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, "**");
|
||||
|
||||
Reference in New Issue
Block a user