-
Notifications
You must be signed in to change notification settings - Fork 47k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not bind topLevelType to dispatch #13618
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,8 @@ import { | |
let _batchedUpdatesImpl = function(fn, bookkeeping) { | ||
return fn(bookkeeping); | ||
}; | ||
let _interactiveUpdatesImpl = function(fn, a, b) { | ||
return fn(a, b); | ||
let _interactiveUpdatesImpl = function(fn, a) { | ||
return fn(a); | ||
}; | ||
let _flushInteractiveUpdatesImpl = function() {}; | ||
|
||
|
@@ -52,8 +52,8 @@ export function batchedUpdates(fn, bookkeeping) { | |
} | ||
} | ||
|
||
export function interactiveUpdates(fn, a, b) { | ||
return _interactiveUpdatesImpl(fn, a, b); | ||
export function interactiveUpdates(fn, a) { | ||
return _interactiveUpdatesImpl(fn, a); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This possibly affects other renders 😨 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you checked whether it does? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should not affect other renders. ReactGenericBatching.interactiveUpdates is only used inside of ReactDOMEventListener. |
||
|
||
export function flushInteractiveUpdates() { | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -42,7 +42,9 @@ const [ | |||||||||||||||||||||||||||||||||||||||||
runEventsInBatch, | ||||||||||||||||||||||||||||||||||||||||||
] = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events; | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
function Event(suffix) {} | ||||||||||||||||||||||||||||||||||||||||||
function Event(type) { | ||||||||||||||||||||||||||||||||||||||||||
this.type = type; | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I‘m a bit confused about this - where do we use this event constructor? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. RestTestUtils.SimulateNative: react/packages/react-dom/src/test-utils/ReactTestUtils.js Lines 479 to 498 in f6fb03e
|
||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
let hasWarnedAboutDeprecatedMockComponent = false; | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
|
@@ -59,7 +61,7 @@ let hasWarnedAboutDeprecatedMockComponent = false; | |||||||||||||||||||||||||||||||||||||||||
*/ | ||||||||||||||||||||||||||||||||||||||||||
function simulateNativeEventOnNode(topLevelType, node, fakeNativeEvent) { | ||||||||||||||||||||||||||||||||||||||||||
fakeNativeEvent.target = node; | ||||||||||||||||||||||||||||||||||||||||||
dispatchEvent(topLevelType, fakeNativeEvent); | ||||||||||||||||||||||||||||||||||||||||||
dispatchEvent(fakeNativeEvent); | ||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
/** | ||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably go straight to master. As far as I can tell, this is a bug, but I don't know if Touch is defined somewhere else or is actually correctly referencing the
Touch
DOM constructor