仅在Google Chrome
上发生此问题。首先,我在文本字段上键入了Chinese character
,然后转到date input
字段(无论我是用鼠标单击还是Tab键输入日期),然后按数字键输入日期-但它只指向原始文本字段本身,并在文本字段中发短信。
抱歉,我无法用有限的语言清楚地描述它。但是我做了一个screen capture。
我尝试在按下数字键时监听按键事件,它向我显示一个按键为Process
的事件。与这种情况有关系吗?我查了一下,这似乎是流程处理的关键事件,当我添加event.preventDefault();
时什么也没发生(一切仍然与screen capture所示的一样。)
关键事件:
{
altKey: false,
bubbles: true,
cancelBubble: false,
cancelable: true,
charCode: 0,
code: "Numpad2",
composed: true,
ctrlKey: false,
currentTarget: null,
defaultPrevented: true,
detail: 0,
eventPhase: 0,
isComposing: false,
isTrusted: true,
key: "Process",
keyCode: 229,
location: 3,
metaKey: false,
repeat: false,
returnValue: false,
shiftKey: false,
type: "keydown",
which: 229
}
我的环境:
感谢您花时间阅读和尝试提供帮助!