Skip to content

Commit 1326bb2

Browse files
committed
Fix test now we use capture phase
Cleanup
1 parent 9bb50d1 commit 1326bb2

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,10 @@ import {
4242

4343
import getEventTarget from './getEventTarget';
4444
import {
45-
TOP_FOCUS,
4645
TOP_LOAD,
4746
TOP_ABORT,
4847
TOP_CANCEL,
4948
TOP_INVALID,
50-
TOP_BLUR,
5149
TOP_SCROLL,
5250
TOP_CLOSE,
5351
TOP_RESET,
@@ -178,8 +176,6 @@ function extractEvents(
178176
}
179177

180178
export const capturePhaseEvents: Set<DOMTopLevelEventType> = new Set([
181-
TOP_FOCUS,
182-
TOP_BLUR,
183179
TOP_SCROLL,
184180
TOP_LOAD,
185181
TOP_ABORT,

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

Lines changed: 3 additions & 3 deletions
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)