Skip to content

Commit 04209cb

Browse files
committed
Fix test now we use capture phase
Cleanup
1 parent 44f1ac5 commit 04209cb

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

packages/react-dom/src/events/DOMModernPluginEventSystem.js

-4
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,10 @@ import {
4343

4444
import getEventTarget from './getEventTarget';
4545
import {
46-
TOP_FOCUS,
4746
TOP_LOAD,
4847
TOP_ABORT,
4948
TOP_CANCEL,
5049
TOP_INVALID,
51-
TOP_BLUR,
5250
TOP_SCROLL,
5351
TOP_CLOSE,
5452
TOP_RESET,
@@ -179,8 +177,6 @@ function extractEvents(
179177
}
180178

181179
export const capturePhaseEvents: Set<DOMTopLevelEventType> = new Set([
182-
TOP_FOCUS,
183-
TOP_BLUR,
184180
TOP_SCROLL,
185181
TOP_LOAD,
186182
TOP_ABORT,

packages/react-dom/src/events/__tests__/DOMModernPluginEventSystem-test.internal.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -854,9 +854,9 @@ describe('DOMModernPluginEventSystem', () => {
854854
divElement.focus();
855855
expect(onFocus).toHaveBeenCalledTimes(3);
856856
expect(onFocusCapture).toHaveBeenCalledTimes(3);
857-
expect(log[2]).toEqual(['capture', divElement]);
858-
expect(log[3]).toEqual(['bubble', divElement]);
859-
expect(log[4]).toEqual(['capture', buttonElement]);
857+
expect(log[2]).toEqual(['capture', buttonElement]);
858+
expect(log[3]).toEqual(['capture', divElement]);
859+
expect(log[4]).toEqual(['bubble', divElement]);
860860
expect(log[5]).toEqual(['bubble', buttonElement]);
861861
});
862862

0 commit comments

Comments
 (0)