@samitouri / QOS-React-2 / commits / c5be746fda

Fixed style and comment nits

Charles Marsh committed Aug 15, 2014 at 11:52 UTC c5be746fda5766440979e18810b105a5394f7fc8
3 files changed +14 -14
docs/docs/ref-05-events.md
+1 -1
@@ -29,7 +29,7 @@ String type
29
30 > Note:
31 >
32 -> As of v0.12, returning `false` from an event handler will no longer stop event propagation. Instead, `stopPropagation()` and `preventDefault()` should be triggered manually.
32 +> As of v0.12, returning `false` from an event handler will no longer stop event propagation. Instead, `e.stopPropagation()` or `e.preventDefault()` should be triggered manually, as appropriate.
33
34
35 ## Supported Events
src/browser/__tests__/ReactBrowserEventEmitter-test.js
+2 -2
@@ -276,8 +276,8 @@ describe('ReactBrowserEventEmitter', function() {
276 expect(console.warn.calls.length).toEqual(1);
277 expect(console.warn.calls[0].args[0]).toBe(
278 'Returning `false` from an event handler will be deprecated in a ' +
279 - 'future release. Instead, manually call stopPropagation() and ' +
280 - 'preventDefault().'
279 + 'future release. Instead, manually call e.stopPropagation() or ' +
280 + 'e.preventDefault(), as appropriate.'
281 );
282 });
283
src/browser/eventPlugins/SimpleEventPlugin.js
+11 -11
@@ -34,8 +34,8 @@ var SyntheticWheelEvent = require('SyntheticWheelEvent');
34 var getEventCharCode = require('getEventCharCode');
35
36 var invariant = require('invariant');
37 -var monitorCodeUse = require('monitorCodeUse');
37 var keyOf = require('keyOf');
38 +var monitorCodeUse = require('monitorCodeUse');
39
40 var topLevelTypes = EventConstants.topLevelTypes;
41
@@ -300,14 +300,14 @@ var SimpleEventPlugin = {
300
301 eventTypes: eventTypes,
302
303 - /**
304 - * Same as the default implementation, except cancels the event when return
305 - * value is false. This behavior will be disabled in a future release.
306 - *
307 - * @param {object} Event to be dispatched.
308 - * @param {function} Application-level callback.
309 - * @param {string} domID DOM ID to pass to the callback.
310 - */
303 + /**
304 + * Same as the default implementation, except cancels the event when return
305 + * value is false. This behavior will be disabled in a future release.
306 + *
307 + * @param {object} Event to be dispatched.
308 + * @param {function} Application-level callback.
309 + * @param {string} domID DOM ID to pass to the callback.
310 + */
311 executeDispatch: function(event, listener, domID) {
312 var returnValue = EventPluginUtils.executeDispatch(event, listener, domID);
313 if (returnValue === false) {
@@ -315,8 +315,8 @@ var SimpleEventPlugin = {
315 monitorCodeUse('react_event_return_false');
316 console.warn(
317 'Returning `false` from an event handler will be deprecated in a ' +
318 - 'future release. Instead, manually call stopPropagation() ' +
319 - 'and preventDefault().'
318 + 'future release. Instead, manually call e.stopPropagation() or ' +
319 + 'e.preventDefault(), as appropriate.'
320 );
321 }
322 event.stopPropagation();