Skip to content
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

[react-events] Use context.objectAssign in Tap responder #16748

Merged
merged 1 commit into from
Sep 11, 2019
Merged
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
8 changes: 4 additions & 4 deletions packages/react-events/src/dom/Tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ function dispatchStart(
const type = 'tap:start';
const onTapStart = props.onTapStart;
if (onTapStart != null) {
const payload = {...state.gestureState, type};
const payload = context.objectAssign({}, state.gestureState, {type});
dispatchDiscreteEvent(context, payload, onTapStart);
}
}
Expand All @@ -402,7 +402,7 @@ function dispatchUpdate(
const type = 'tap:update';
const onTapUpdate = props.onTapUpdate;
if (onTapUpdate != null) {
const payload = {...state.gestureState, type};
const payload = context.objectAssign({}, state.gestureState, {type});
dispatchUserBlockingEvent(context, payload, onTapUpdate);
}
}
Expand All @@ -415,7 +415,7 @@ function dispatchEnd(
const type = 'tap:end';
const onTapEnd = props.onTapEnd;
if (onTapEnd != null) {
const payload = {...state.gestureState, type};
const payload = context.objectAssign({}, state.gestureState, {type});
dispatchDiscreteEvent(context, payload, onTapEnd);
}
}
Expand All @@ -428,7 +428,7 @@ function dispatchCancel(
const type = 'tap:cancel';
const onTapCancel = props.onTapCancel;
if (onTapCancel != null) {
const payload = {...state.gestureState, type};
const payload = context.objectAssign({}, state.gestureState, {type});
dispatchDiscreteEvent(context, payload, onTapCancel);
}
}
Expand Down