keithamus/jwerty

Key binding not working on IE

Open

#5 aperta il 24 ott 2011

Vedi su GitHub
 (15 commenti) (0 reazioni) (0 assegnatari)JavaScript (117 fork)batch import
bughelp wanted

Metriche repository

Star
 (1214 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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.

Guida contributor