keithamus/jwerty

Key binding not working on IE

Open

#5 ouverte le 24 oct. 2011

Voir sur GitHub
 (15 commentaires) (0 réactions) (0 assignés)JavaScript (117 forks)batch import
bughelp wanted

Métriques du dépôt

Stars
 (1 214 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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.

Guide contributeur