浏览代码

bug2276,FF26初始光标位置问题2600

zhouna 5 年之前
父节点
当前提交
c94d16a9e7
共有 2 个文件被更改,包括 2 次插入6 次删除
  1. 1 5
      src/common/components/ItemBox/index.jsx
  2. 1 1
      src/components/MainSuit/index.jsx

+ 1 - 5
src/common/components/ItemBox/index.jsx

@@ -57,17 +57,13 @@ componentWillReceiveProps(nextP){
         that.context.scrollArea&&that.context.scrollArea.refresh();
       });
     }
-    //bug2276,FF26初始光标位置问题
-    if(!nextP.children&&!nextP.fuzhen){
-      this.$div.current.innerHTML='';
-    }
 }
   render(){
     const {title,children,editable,className,handleFocus,fuzhen,border,handleBlur,titleTop,backgroundColor,boxId} = this.props;
     return <div className={style["box"]+" "+"clearfix"} >
       <div className={style["title"] + ' '+(className||'')} style={{marginTop:titleTop?'22px':''}}>{title}</div>
       <div ref={this.$div} className={`${style["content"]} ${border?style["border"]:''} ${backgroundColor?style["noBorder"]:''}`} contentEditable={editable} style={this.getBoxStyle()} onFocus={editable?handleFocus:null} onInput={this.handleInput} onClick={(e)=>{this.handleClick(e);}} onBlur={handleBlur} id={boxId} onkeydown={handleEnter}>
-        {fuzhen?children||fuzhen||'':children||''}
+        {fuzhen?children||fuzhen:children}
       </div>
     </div>
   }

+ 1 - 1
src/components/MainSuit/index.jsx

@@ -294,7 +294,7 @@ class MainSuit extends Component{
       handleBlur={this.handleBlur}
       data={datas}
       boxId="mainSuit">
-        {datas.length>0?<div style={{display:'inline-block'}}>{this.getInlineTag()}</div>:(saveText[0]?saveText[0]:'')}
+        {''}{datas.length>0?<div style={{display:'inline-block'}}>{this.getInlineTag()}</div>:(saveText[0]?saveText[0]:'')}
       </ItemBox>
       {/*没有推送结果就不显示*/}
       {symptomFlag && !searchFlag ? <CommonSymptom data={CommonSymptoms} show={!totalHide&&symptom} onSelect={this.handleSelect} /> : ( searchFlag ? <SearchDrop data={searchData} show={!commSymHide} onSelect={this.handleSearchSelect} left={boxLeft1} top={boxTop1} mainEmpty={datas.length==0?true:false}/>:"")}