Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/react-dom-bindings/src/events/DOMEventNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export type DOMEventName =
| 'focusin'
| 'focusout'
| 'fullscreenchange'
| 'fullscreenerror'
| 'gotpointercapture'
| 'hashchange'
| 'input'
Expand Down
2 changes: 2 additions & 0 deletions packages/react-dom-bindings/src/events/DOMEventProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ const simpleEventPluginEvents = [
'encrypted',
'ended',
'error',
'fullscreenChange',
'fullscreenError',
'gotPointerCapture',
'input',
'invalid',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ export function getEventPriority(domEventName: DOMEventName): EventPriority {
case 'beforeinput':
case 'blur':
case 'fullscreenchange':
case 'fullscreenerror':
case 'focus':
case 'hashchange':
case 'popstate':
Expand Down
34 changes: 34 additions & 0 deletions packages/react-dom/src/__tests__/ReactDOMEventPropagation-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,40 @@ describe('ReactDOMEventListener', () => {
},
});
});

it('onFullscreenChange', async () => {
await testNativeBubblingEvent({
type: 'div',
reactEvent: 'onFullscreenChange',
reactEventType: 'fullscreenchange',
nativeEvent: 'fullscreenchange',
dispatch(node) {
node.dispatchEvent(
new Event('fullscreenchange', {
bubbles: true,
cancelable: false,
}),
);
},
});
});

it('onFullscreenError', async () => {
await testNativeBubblingEvent({
type: 'div',
reactEvent: 'onFullscreenError',
reactEventType: 'fullscreenerror',
nativeEvent: 'fullscreenerror',
dispatch(node) {
node.dispatchEvent(
new Event('fullscreenerror', {
bubbles: true,
cancelable: false,
}),
);
},
});
});
});

describe('non-bubbling events that bubble in React', () => {
Expand Down
Loading