Browse Source

单选双击编辑删光后失焦存值bug修改

zhouna 6 years ago
parent
commit
ad5200304d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/components/RadioDrop/index.jsx

+ 4 - 1
src/components/RadioDrop/index.jsx

@@ -25,6 +25,7 @@ class RadioDrop extends Component{
       timer:null
     };
     this.$cont = React.createRef();
+    this.isIE = navigator.appName=="Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g,"")=="MSIE8.0";
     this.handleSelect = this.handleSelect.bind(this);
     this.handleShow = this.handleShow.bind(this);
     this.handledbClick = this.handledbClick.bind(this);
@@ -104,7 +105,9 @@ class RadioDrop extends Component{
    // 更改标签的value值
     const ev = e || window.event;
     let changeVal = ev.target.innerText;
-    ev.target.innerText = '';
+    if(!this.isIE){
+      ev.target.innerText = '';
+    }
     handleLabelEdit && handleLabelEdit({ikey,changeVal,type:boxMark});
   }
   handledbClick(e){