From 81edd2c527d10daff2afd9b54750af5883795cc2 Mon Sep 17 00:00:00 2001 From: Charles Marsh Date: Wed, 13 Aug 2014 21:56:05 -0400 Subject: [PATCH] Deprecate 'return false' in event handlers --- _config.yml | 2 +- docs/ref-05-events.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index 75ca27e2..457559ad 100644 --- a/_config.yml +++ b/_config.yml @@ -34,4 +34,4 @@ sass: sass_dir: _css gems: - jekyll-redirect-from -react_version: 0.11.1 +react_version: 0.12.0-alpha diff --git a/docs/ref-05-events.md b/docs/ref-05-events.md index f331d010..7ce50f6a 100644 --- a/docs/ref-05-events.md +++ b/docs/ref-05-events.md @@ -10,6 +10,10 @@ next: dom-differences.html Your event handlers will be passed instances of `SyntheticEvent`, a cross-browser wrapper around the browser's native event. It has the same interface as the browser's native event, including `stopPropagation()` and `preventDefault()`, except the events work identically across all browsers. +> Note: +> +> Prior to v0.12, event handlers could return `false` to stop propagation. This behavior is no longer supported; instead, `stopPropagation()` and `preventDefault()` should be triggered manually. + If you find that you need the underlying browser event for some reason, simply use the `nativeEvent` attribute to get it. Every `SyntheticEvent` object has the following attributes: ```javascript @@ -111,7 +115,7 @@ onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp ``` -Properties: +Properties: ```javascript boolean altKey