Browse Source

数字键盘隐藏bug修改

zhouna 5 năm trước cách đây
mục cha
commit
0995476f08

+ 2 - 1
src/common/components/NumberPan/index.jsx

@@ -63,7 +63,8 @@ class NumberPan extends Component{
     return <div className={style['panBox']}
                 style={this.getStyle()}
                 onBlur={(e)=>e.stopPropagation()} 
-                onDoubleClick={(e)=>e.stopPropagation()}>
+                onDoubleClick={(e)=>e.stopPropagation()}
+                onClick={(e)=>e.stopPropagation()}>
       <table className={style['pan']} >
         <tr>
           <td><button onMouseUp={select}>1</button></td>

+ 2 - 2
src/components/NumberDrop/index.jsx

@@ -92,6 +92,7 @@ class NumberDrop extends Component{
     }
   }
   handleNumClick(e){     //数字框不可编辑的状态时点击事件,点击将数字框变为可输入且下拉不再显示直到失焦后再次聚集
+    e.stopPropagation();
     const {show,handleShow,ikey,id,patId,handleHide,value} = this.props;
     if(show) {
       handleHide && handleHide();
@@ -103,7 +104,6 @@ class NumberDrop extends Component{
       });
       handleShow&&handleShow({ikey,id:patId||id});
     }
-    e.stopPropagation();
   }
   validSymbols(txt,min,max){
     //输入只有一个~或/时判断两边是否为合理数字,有多个为不合理
@@ -207,7 +207,7 @@ class NumberDrop extends Component{
             contentEditable={true}
             style={{minWidth:'10px',display:'inline-block',textAlign:'center'}}
             ref = {this.$span}
-            onKeyDown={this.handleKeyDowm}
+            onKeyUp={this.handleKeyDowm}
             onBlur={this.numInpBlur}
             onInput={this.handleSpanInp}
             className={this.getSpanClass()}