GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Revert "Revert "Remove onScroll bubbling flag (#19535)" (#19655)" (#1… · react/react@bcc0aa4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • react-dom/src
      • __tests__
        • ReactDOMEventListener-test.js
        • ReactDOMEventPropagation-test.js
      • events/plugins
        • SimpleEventPlugin.js
    • shared
      • ReactFeatureFlags.js
      • forks
        • ReactFeatureFlags.native-fb.js
        • ReactFeatureFlags.native-oss.js
        • ReactFeatureFlags.test-renderer.js
        • ReactFeatureFlags.test-renderer.www.js
        • ReactFeatureFlags.testing.js
        • ReactFeatureFlags.testing.www.js
        • ReactFeatureFlags.www-dynamic.js
        • ReactFeatureFlags.www.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/react-dom/src/__tests__/ReactDOMEventListener-test.js‎

Copy file name to clipboardExpand all lines: packages/react-dom/src/__tests__/ReactDOMEventListener-test.js
+6-17Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -743,23 +743,12 @@ describe('ReactDOMEventListener', () => {
743743
bubbles: false,
744744
}),
745745
);
746-
if (gate(flags => flags.disableOnScrollBubbling)) {
747-
expect(log).toEqual([
748-
['capture', 'grand'],
749-
['capture', 'parent'],
750-
['capture', 'child'],
751-
['bubble', 'child'],
752-
]);
753-
} else {
754-
expect(log).toEqual([
755-
['capture', 'grand'],
756-
['capture', 'parent'],
757-
['capture', 'child'],
758-
['bubble', 'child'],
759-
['bubble', 'parent'],
760-
['bubble', 'grand'],
761-
]);
762-
}
746+
expect(log).toEqual([
747+
['capture', 'grand'],
748+
['capture', 'parent'],
749+
['capture', 'child'],
750+
['bubble', 'child'],
751+
]);
763752
} finally {
764753
document.body.removeChild(container);
765754
}
Collapse file

‎packages/react-dom/src/__tests__/ReactDOMEventPropagation-test.js‎

Copy file name to clipboardExpand all lines: packages/react-dom/src/__tests__/ReactDOMEventPropagation-test.js
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,12 +1225,6 @@ describe('ReactDOMEventListener', () => {
12251225
});
12261226

12271227
describe('non-bubbling events that do not bubble in React', () => {
1228-
// This test will fail outside of the no-bubbling flag
1229-
// because its bubbling emulation is currently broken.
1230-
// In particular, if the target itself doesn't have
1231-
// a handler, it will not emulate bubbling correctly.
1232-
// Instead of fixing this, we'll just turn this flag on.
1233-
// @gate disableOnScrollBubbling
12341228
it('onScroll', () => {
12351229
testNonBubblingEvent({
12361230
type: 'div',
Collapse file

‎packages/react-dom/src/events/plugins/SimpleEventPlugin.js‎

Copy file name to clipboardExpand all lines: packages/react-dom/src/events/plugins/SimpleEventPlugin.js
+8-13Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ import {IS_EVENT_HANDLE_NON_MANAGED_NODE} from '../EventSystemFlags';
4747
import getEventCharCode from '../getEventCharCode';
4848
import {IS_CAPTURE_PHASE} from '../EventSystemFlags';
4949

50-
import {
51-
enableCreateEventHandleAPI,
52-
disableOnScrollBubbling,
53-
} from 'shared/ReactFeatureFlags';
50+
import {enableCreateEventHandleAPI} from 'shared/ReactFeatureFlags';
5451

5552
function extractEvents(
5653
dispatchQueue: DispatchQueue,
@@ -185,15 +182,13 @@ function extractEvents(
185182
// In the past, React has always bubbled them, but this can be surprising.
186183
// We're going to try aligning closer to the browser behavior by not bubbling
187184
// them in React either. We'll start by not bubbling onScroll, and then expand.
188-
let accumulateTargetOnly = false;
189-
if (disableOnScrollBubbling) {
190-
accumulateTargetOnly =
191-
!inCapturePhase &&
192-
// TODO: ideally, we'd eventually add all events from
193-
// nonDelegatedEvents list in DOMPluginEventSystem.
194-
// Then we can remove this special list.
195-
domEventName === 'scroll';
196-
}
185+
const accumulateTargetOnly =
186+
!inCapturePhase &&
187+
// TODO: ideally, we'd eventually add all events from
188+
// nonDelegatedEvents list in DOMPluginEventSystem.
189+
// Then we can remove this special list.
190+
// This is a breaking change that can wait until React 18.
191+
domEventName === 'scroll';
197192

198193
accumulateSinglePhaseListeners(
199194
targetInst,
Collapse file

‎packages/shared/ReactFeatureFlags.js‎

Copy file name to clipboardExpand all lines: packages/shared/ReactFeatureFlags.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,5 @@ export const enableDiscreteEventFlushingChange = false;
135135

136136
// https://github.com/facebook/react/pull/19654
137137
export const enablePassiveEventIntervention = true;
138-
export const disableOnScrollBubbling = true;
139138

140139
export const enableEagerRootListeners = true;
Collapse file

‎packages/shared/forks/ReactFeatureFlags.native-fb.js‎

Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.native-fb.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export const enableComponentStackLocations = false;
4444
export const enableLegacyFBSupport = false;
4545
export const enableFilterEmptyStringAttributesDOM = false;
4646
export const skipUnmountedBoundaries = false;
47-
export const disableOnScrollBubbling = true;
4847

4948
export const enableNewReconciler = false;
5049
export const deferRenderPhaseUpdateToNextBatch = true;
Collapse file

‎packages/shared/forks/ReactFeatureFlags.native-oss.js‎

Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.native-oss.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export const enableComponentStackLocations = false;
4343
export const enableLegacyFBSupport = false;
4444
export const enableFilterEmptyStringAttributesDOM = false;
4545
export const skipUnmountedBoundaries = false;
46-
export const disableOnScrollBubbling = true;
4746

4847
export const enableNewReconciler = false;
4948
export const deferRenderPhaseUpdateToNextBatch = true;
Collapse file

‎packages/shared/forks/ReactFeatureFlags.test-renderer.js‎

Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.test-renderer.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export const enableComponentStackLocations = true;
4343
export const enableLegacyFBSupport = false;
4444
export const enableFilterEmptyStringAttributesDOM = false;
4545
export const skipUnmountedBoundaries = false;
46-
export const disableOnScrollBubbling = true;
4746

4847
export const enableNewReconciler = false;
4948
export const deferRenderPhaseUpdateToNextBatch = true;
Collapse file

‎packages/shared/forks/ReactFeatureFlags.test-renderer.www.js‎

Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export const enableComponentStackLocations = true;
4343
export const enableLegacyFBSupport = false;
4444
export const enableFilterEmptyStringAttributesDOM = false;
4545
export const skipUnmountedBoundaries = false;
46-
export const disableOnScrollBubbling = true;
4746

4847
export const enableNewReconciler = false;
4948
export const deferRenderPhaseUpdateToNextBatch = true;
Collapse file

‎packages/shared/forks/ReactFeatureFlags.testing.js‎

Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.testing.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export const enableComponentStackLocations = true;
4343
export const enableLegacyFBSupport = false;
4444
export const enableFilterEmptyStringAttributesDOM = false;
4545
export const skipUnmountedBoundaries = false;
46-
export const disableOnScrollBubbling = true;
4746

4847
export const enableNewReconciler = false;
4948
export const deferRenderPhaseUpdateToNextBatch = true;
Collapse file

‎packages/shared/forks/ReactFeatureFlags.testing.www.js‎

Copy file name to clipboardExpand all lines: packages/shared/forks/ReactFeatureFlags.testing.www.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export const enableComponentStackLocations = true;
4343
export const enableLegacyFBSupport = !__EXPERIMENTAL__;
4444
export const enableFilterEmptyStringAttributesDOM = false;
4545
export const skipUnmountedBoundaries = __EXPERIMENTAL__;
46-
export const disableOnScrollBubbling = true;
4746

4847
export const enableNewReconciler = false;
4948
export const deferRenderPhaseUpdateToNextBatch = true;

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.