Is it possible to focus div (or any other elements) using the focus() method?
focus()
I\'ve set a tabIndex to a div element:
This worked in my case
render: function(){ if(this.props.edit){ setTimeout(()=>{ this.divElement.focus() },0) } return this.divElement = divElement} contentEditable={props.edit}/> } 0 讨论(0) 查看其它6个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复