From c5de81d0481b030774b4be29ef8bc69f98c9887e Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Mon, 4 Nov 2013 17:33:17 -0800 Subject: [PATCH] Prevent accidentally overriding preventDefault with undefined --- src/dispatcher.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dispatcher.js b/src/dispatcher.js index 04da312a..5a4deba7 100644 --- a/src/dispatcher.js +++ b/src/dispatcher.js @@ -223,7 +223,9 @@ inEvent.relatedTarget = null; } var e = new PointerEvent(inType, inEvent); - e.preventDefault = inEvent.preventDefault; + if (inEvent.preventDefault) { + e.preventDefault = inEvent.preventDefault; + } this.targets.set(e, this.targets.get(inEvent) || inEvent.target); return e; },