From ec7f13e6389610624141c1b8f7f33b4a0cd20ef2 Mon Sep 17 00:00:00 2001 From: Matthew McClure Date: Tue, 28 Jan 2014 11:46:28 -0800 Subject: [PATCH 1/2] don't copy returnValue if preventDefault is supported --- src/js/events.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/js/events.js b/src/js/events.js index 53589f3dde..2563d06860 100644 --- a/src/js/events.js +++ b/src/js/events.js @@ -180,7 +180,11 @@ vjs.fixEvent = function(event) { 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 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]; + } } } From 64bc97a3fd2a7895afc70b4f01ac81477bc91a24 Mon Sep 17 00:00:00 2001 From: Matthew McClure Date: Tue, 28 Jan 2014 12:41:31 -0800 Subject: [PATCH 2/2] added keyboardEvent.keyLocation to ignored events --- src/js/events.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/events.js b/src/js/events.js index 2563d06860..74498eb159 100644 --- a/src/js/events.js +++ b/src/js/events.js @@ -179,7 +179,8 @@ 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') { + // 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)) {