Explorar o código

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

zhouna %!s(int64=5) %!d(string=hai) anos
pai
achega
2617083964
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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);
   }