Add missing events to the common components reference - #8680
TheSeydiCharyyev wants to merge 1 commit into
Conversation
Add onScrollEnd, onFullscreenChange, onFullscreenError, onMouseOver, onPointerOver and onDragLeave to the list of common events. Document onBeforeToggle, and list <dialog> and popover elements for onToggle and onBeforeToggle.
Size changesDetails📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 One Page Changed SizeThe following page changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 10% or more, there will be a red status indicator applied, indicating that special attention should be given to this. |
The common components page now lists 7 more events that React supports. It also says that
onToggleworks for<dialog>and popover elements, not only for<details>.Added to the list of common events:
onScrollEnd(React 19.0). LikeonScroll, it does not bubble.onFullscreenChangeandonFullscreenError(React 19.3).onMouseOver,onPointerOverandonDragLeave. React has supported them for a long time, and this page uses them in its own examples, but they were missing from the list.Toggle events:
onBeforeToggle.onTogglesaid "only for<details>". Since React 19.0,onToggleandonBeforeTogglealso work on elements with thepopoverattribute, and since React 19.1 on<dialog>. The group text now says this.Not in this PR:
onTransitionRun,onTransitionStartandonTransitionCancel. React registers them, but right now the handlers get a plainSyntheticEventwithout theTransitionEventfields. [DOM] Fix missing propertyName on transitionrun, transitionstart, and transitioncancel react/react#37631 is open to fix this. They can be added after it lands.onAnimationCancel. It is onmainin React, but not in a stable release yet.How I checked: I compared the list with
DOMEventProperties.js,ReactDOMComponent.jsandSimpleEventPlugin.jsat thev19.3.0tag, and with the React changelog. Each new line uses the same format as the lines around it.