From 1302a20ece8fd32be364675adc7a5f11277a4b86 Mon Sep 17 00:00:00 2001 From: zoe Date: Thu, 7 Dec 2017 16:37:28 +0800 Subject: [PATCH] =?UTF-8?q?'=E6=95=B4=E5=90=88=E5=91=BD=E4=BB=A4=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/commandLineInput/InputHint.tsx | 9 +++++---- src/UI/Store/CommandStore.ts | 17 +++++++++-------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/UI/Components/commandLineInput/InputHint.tsx b/src/UI/Components/commandLineInput/InputHint.tsx index 1fae84c78..2e4b32229 100644 --- a/src/UI/Components/commandLineInput/InputHint.tsx +++ b/src/UI/Components/commandLineInput/InputHint.tsx @@ -130,7 +130,9 @@ export default class InputHint extends React.Component<{ commandStore?: CommandS //绑定键盘命令 public handleSelectCommand = (e: KeyboardEvent) => { - // (this.props.commandStore.elInput as HTMLInputElement).focus(); + // if (document.activeElement.nodeName !== 'INPUT') + // (this.props.commandStore.elInput as HTMLInputElement).focus(); + let m_li: HTMLCollection = this.m_recommendUl.children;; let historyCommands = this.state.historyCommands; @@ -459,10 +461,9 @@ export default class InputHint extends React.Component<{ commandStore?: CommandS type="text" placeholder="请输入命令" ref={o => { this.props.commandStore.elInput = o; }} - // onKeyPress={this.handleConfirmInput} - onKeyDown={e => { e.preventDefault() }} + // onKeyDown={e => { e.preventDefault() }} onChange={this.handleOnChange} - // value={this.state.command} + value={this.state.command} />