Skip to content

Commit

Permalink
Close videojsGH-971: Quiet down deprecation warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew McClure authored and heff committed Feb 7, 2014
1 parent 2d5ca1e commit 3cb41c7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/js/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,13 @@ vjs.fixEvent = function(event) {
// TODO: Probably best to create a whitelist of event props
for (var key in old) {
// Safari 6.0.3 warns you if you try to copy deprecated layerX/Y
if (key !== 'layerX' && key !== 'layerY') {
event[key] = old[key];
// Chrome warns you if you try to copy deprecated keyboardEvent.keyLocation
if (key !== 'layerX' && key !== 'layerY' && key !== 'keyboardEvent.keyLocation') {
// 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)) {
event[key] = old[key];
}
}
}

Expand Down

0 comments on commit 3cb41c7

Please sign in to comment.