* More docs onFocus and onBlur events
Including more substantial documentation around the `onFocus` and `onBlur` events that aren't so common sense on first look.
* Update content/docs/reference-events.md
Co-authored-by: Darsh Shah <imdarshshah@gmail.com>
* Update reference-events.md
Adding an example of `relatedTarget` to determine orgin of onblur or onfocus events
* Update reference-events.md
* Update content/docs/reference-events.md
Fixing `onBlur` example bug.
Co-authored-by: Darsh Shah <imdarshshah@gmail.com>
* Update reference-events.md
Fixing spacing in `onBlur` `onFocus` examples and tagging them with `javascript`
* Update reference-events.md
* Update reference-events.md
* Update reference-events.md
Co-authored-by: Darsh Shah <imdarshshah@gmail.com>
Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* remove event pooling and SyntheticEvent#persist from documents
Syntheticevent#event exists in v17, but it does nothing at the version
* add a page for legacy event pooling for _redirects
* add a warning e.persist() is no longer pooled
* Update legacy-event-pooling.md
* docs: update a redirect link for event pooling
* Update legacy-event-pooling.md
* Update legacy-event-pooling.md
* Update reference-events.md
Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Since persist() is referred to in the doc as a method for disabling event pooling, that must mean it's part of the SyntheticEvent API.
I'm proposing to state it more explicitly so that there's no doubt for newcomers like me whether it is the SyntheticEvent or the actual JS event that has the method.
Adds a new docs website, built with Gatsby JS, to replace the old Jekyll site. Source code for the new site lives in /www (although markdown and YML data still comes from the legacy /docs folder).
Changes to either markdown or website source code can be previewed on Netlify. The react-js bot should automatically add comments to each PR with preview links. (This preview is generated by running the newly-added yarn build:docs command in the root package.json.)
The majority of the changes in this PR are contained within the new /www directory. However some minor modifications have been made to existing content in the /docs directory:
* Modified frontmatter author block to always be an array
* Small markdown formatting tweaks
* Add onToggle event to details tag
Fixes#8761
* Map onToggle event on ReactDOMFiberComponent
* Tweak doc
* Trap events on setInitialProperties for details tag
Now that #1169 is fixed, the only thing this is used for is to determine whether `onTouchTap` causes touch listeners to be added. The only internal uses of TapEventPlugin are where touch events are already initialized (so this doesn't make a difference) and we don't support `onTouchTap` as part of the public API so this should be safe.
KeyboardEvent now normalizes "charCode", "keyCode", "which" across all browsers
KeyboardEvent has partial "key"-support for KeyDown/KeyUp and full "key"-support for KeyPress.
KeyboardEvent, MouseEvent and TouchEvent now has "getModifierState", polyfill when not implemented.