From 8fb7749f00e7b24016f40d564bf76904ed144562 Mon Sep 17 00:00:00 2001 From: Nate Hunzaker Date: Fri, 2 Sep 2016 20:48:37 -0400 Subject: [PATCH] Reduce number of mouse events disabable. Formatting in isIteractive() --- .../dom/client/eventPlugins/SimpleEventPlugin.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/renderers/dom/client/eventPlugins/SimpleEventPlugin.js b/src/renderers/dom/client/eventPlugins/SimpleEventPlugin.js index e4f0a6cbc3512..ddfd4fe06dbdf 100644 --- a/src/renderers/dom/client/eventPlugins/SimpleEventPlugin.js +++ b/src/renderers/dom/client/eventPlugins/SimpleEventPlugin.js @@ -138,8 +138,8 @@ function getDictionaryKey(inst) { } function isInteractive(tag) { - return tag === 'button' || tag === 'input' - || tag === 'textarea' || tag === 'select'; + return tag === 'button' || tag === 'input' || + tag === 'textarea' || tag === 'select'; } function shouldPreventMouseEvent(inst) { @@ -225,17 +225,18 @@ var SimpleEventPlugin = { return null; } /* falls through */ - case 'topContextMenu': case 'topDoubleClick': case 'topMouseDown': case 'topMouseMove': - case 'topMouseOut': - case 'topMouseOver': case 'topMouseUp': // Disabled elements should not respond to mouse events if (shouldPreventMouseEvent(targetInst)) { return null; } + /* falls through */ + case 'topMouseOut': + case 'topMouseOver': + case 'topContextMenu': EventConstructor = SyntheticMouseEvent; break; case 'topDrag':