KeyboardEvent in Chrome, keyCode is 0

后端 未结 6 1538
北海茫月
北海茫月 2020-12-05 13:32

I am trying to set keyCode on dispatched event object .

On button click, event is raised on textbox control to simulating keydown event. Event is raised successfully

6条回答
  •  一生所求
    2020-12-05 13:54

    It looks like it's been a bit since you asked this so you may have already found the answer to your question. In case you haven't though, there is a bug in Webkit as was pointed out in this SO question that causes the keyCode to always be 0. Apparently there's not much you can do until they fix it. Sadly it doesn't look like anyone is really working on it though. It's not the answer you want to hear, but it's really the only answer anyone can give you for this right now.

提交回复
热议问题