keithamus/jwerty

Key binding not working on IE

Open

#5 建立於 2011年10月24日

在 GitHub 查看
 (15 留言) (0 反應) (0 負責人)JavaScript (1,214 star) (117 fork)batch import
bughelp wanted

描述

Hi,

First of all gratz for this awesome lib ! Nevertheless i cant make it work on internet explorer due to the event.metaKey property which is 'undefined' on IE. Thus each property in the jwertyCode object are not equals to those in the event object :

// For each property in the jwertyCode object, compare to `event`
for (var p in jwertyCode[n]) {
// ...except for jwertyCode.jwertyCombo...
 if (p !== 'jwertyCombo' && event[p] !== jwertyCode[n][p]) returnValue = false;
 }

I temporarily bypassed this IE problem by removing the metaKey references in your lib.

貢獻者指南