Browse Source

查体生命体征标签删除光标bug修改2373

zhouna 5 years ago
parent
commit
2617083964
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/common/components/EditableSpan/index.jsx

+ 4 - 0
src/common/components/EditableSpan/index.jsx

@@ -305,6 +305,10 @@ class EditableSpan extends Component{
     const ext = preIsExt?style['ext']:style['unselect'];
     const unselect = value.match(config.punctuationReg)||preSelected?'':ext;
     const hasBr = br?style['editable-br']:'';       //最后一个体征标签换行
+    const $span = this.$span.current;
+    if(br&&$span&&!$span.innerText){
+      this.$span.current.innerHTML=' ';
+    }
     return classNames(style['editable-span'],isFull,unselect,hasBr);
   }