Better click behavior for ff
Firefox created onClick events for right mouse clicks. This diff brings behavior on firefox inline with other browsers.
Owen Coutts committed
Oct 11, 2013 at 15:42 UTC
ac9f5e9da43fcf2655c675d45fd04c55763ce095
1 file changed
+6
src/eventPlugins/SimpleEventPlugin.js
+6
@@ -308,6 +308,12 @@ var SimpleEventPlugin = {
308
EventConstructor = SyntheticFocusEvent;
309
break;
310
case topLevelTypes.topClick:
311
+ // Firefox creates a click event on right mouse clicks. This removes the
312
+ // unwanted click events.
313
+ if (nativeEvent.button === 2) {
314
+ return null;
315
+ }
316
+ /* falls through */
317
case topLevelTypes.topDoubleClick:
318
case topLevelTypes.topDrag:
319
case topLevelTypes.topDragEnd: