Skip to content

Commit

Permalink
Skip copying webkitMovementX/Y
Browse files Browse the repository at this point in the history
webkitMovementX/Y seem to be deprecated in Chrome 45+, this fix skips
those keys.
Fixes #2548
  • Loading branch information
jforbes committed Sep 4, 2015
1 parent ccb6b35 commit 9a17c17
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/utils/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ export function fixEvent(event) {
for (var key in old) {
// Safari 6.0.3 warns you if you try to copy deprecated layerX/Y
// Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation
if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation') {
// and webkitMovementX/Y
if (key !== 'layerX' && key !== 'layerY' && key !== 'keyLocation' &&
key !== 'webkitMovementX' && key !== 'webkitMovementY') {
// Chrome 32+ warns if you try to copy deprecated returnValue, but
// we still want to if preventDefault isn't supported (IE8).
if (!(key === 'returnValue' && old.preventDefault)) {
Expand Down

0 comments on commit 9a17c17

Please sign in to comment.