mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-08 07:28:26 +00:00
dont format empty ranges
This commit is contained in:
@@ -434,6 +434,9 @@ export default class BasicMessageEditor extends React.Component {
|
|||||||
this._editorRef,
|
this._editorRef,
|
||||||
this.props.model,
|
this.props.model,
|
||||||
document.getSelection());
|
document.getSelection());
|
||||||
|
if (range.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case "bold":
|
case "bold":
|
||||||
formatInline(range, "**");
|
formatInline(range, "**");
|
||||||
|
|||||||
Reference in New Issue
Block a user