فهرست منبع

现病史双击编辑数字键盘阻止冒泡1234

zhouna 6 سال پیش
والد
کامیت
f78ecc6489
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      src/components/NumberDrop/index.jsx

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

@@ -262,7 +262,8 @@ class NumberDrop extends Component{
                 onClick={allClick?this.handleNumClick:null}
                 onClick={allClick?this.handleNumClick:null}
                 contentEditable={editable}
                 contentEditable={editable}
                 onBlur={this.handleBlur}
                 onBlur={this.handleBlur}
-                onkeydown={handleEnter}>
+                onkeydown={handleEnter}
+                onFocus={(e)=>{e.stopPropagation()}}>
       <span ref = {this.$pre}>&nbsp;{prefix}</span>
       <span ref = {this.$pre}>&nbsp;{prefix}</span>
       <span onFocus={this.handleNumFocus}
       <span onFocus={this.handleNumFocus}
             onClick={allClick?null:this.handleNumClick}
             onClick={allClick?null:this.handleNumClick}