Skip to content

Commit 8d5482d

Browse files
Harini Malothumeta-codesync[bot]
authored andcommitted
Add missing VIEW_EVENT_CASE entries for W3C Pointer Events in BaseViewProps::setProp (#56188)
Summary: Resolves microsoft/react-native-windows#15827 [ViewEvents::Offset](vscode-file://vscode-app/c:/Program%20Files/Windows%20Development/Microsoft%20VS%20Code/07ff9d6178/resources/app/out/vs/code/electron-browser/workbench/workbench.html) defines enum values for [Click](vscode-file://vscode-app/c:/Program%20Files/Windows%20Development/Microsoft%20VS%20Code/07ff9d6178/resources/app/out/vs/code/electron-browser/workbench/workbench.html), [ClickCapture](vscode-file://vscode-app/c:/Program%20Files/Windows%20Development/Microsoft%20VS%20Code/07ff9d6178/resources/app/out/vs/code/electron-browser/workbench/workbench.html), [PointerDown](vscode-file://vscode-app/c:/Program%20Files/Windows%20Development/Microsoft%20VS%20Code/07ff9d6178/resources/app/out/vs/code/electron-browser/workbench/workbench.html), [PointerDownCapture](vscode-file://vscode-app/c:/Program%20Files/Windows%20Development/Microsoft%20VS%20Code/07ff9d6178/resources/app/out/vs/code/electron-browser/workbench/workbench.html), [PointerUp](vscode-file://vscode-app/c:/Program%20Files/Windows%20Development/Microsoft%20VS%20Code/07ff9d6178/resources/app/out/vs/code/electron-browser/workbench/workbench.html), [PointerUpCapture](vscode-file://vscode-app/c:/Program%20Files/Windows%20Development/Microsoft%20VS%20Code/07ff9d6178/resources/app/out/vs/code/electron-browser/workbench/workbench.html), [GotPointerCapture](vscode-file://vscode-app/c:/Program%20Files/Windows%20Development/Microsoft%20VS%20Code/07ff9d6178/resources/app/out/vs/code/electron-browser/workbench/workbench.html), and [LostPointerCapture](vscode-file://vscode-app/c:/Program%20Files/Windows%20Development/Microsoft%20VS%20Code/07ff9d6178/resources/app/out/vs/code/electron-browser/workbench/workbench.html) (offsets 30–37), but BaseViewProps::setProp() has no corresponding VIEW_EVENT_CASE entries for them. This means when enableCppPropsIteratorSetter() is enabled, these event props (onPointerDown, onPointerUp, onClick, onGotPointerCapture, onLostPointerCapture, and their capture variants) are never parsed from JS — the bits in [ViewEvents](vscode-file://vscode-app/c:/Program%20Files/Windows%20Development/Microsoft%20VS%20Code/07ff9d6178/resources/app/out/vs/code/electron-browser/workbench/workbench.html) are never set, so the native side never knows a component is listening for these events. This PR adds the 8 missing VIEW_EVENT_CASE entries alongside the existing pointer event cases. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [GENERAL][FIXED] - Add missing VIEW_EVENT_CASE entries in BaseViewProps::setProp for Click, PointerDown, PointerUp, GotPointerCapture, LostPointerCapture and their Capture variants (offsets 30-37) Resolves [#15287](microsoft/react-native-windows#15827) For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Pull Request resolved: #56188 Reviewed By: christophpurrer Differential Revision: D97732755 Pulled By: javache fbshipit-source-id: 1835f0e62813f146809631f87e4794f0af97db2a
1 parent 5976cff commit 8d5482d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,14 @@ void BaseViewProps::setProp(
442442
VIEW_EVENT_CASE(PointerOverCapture);
443443
VIEW_EVENT_CASE(PointerOut);
444444
VIEW_EVENT_CASE(PointerOutCapture);
445+
VIEW_EVENT_CASE(Click);
446+
VIEW_EVENT_CASE(ClickCapture);
447+
VIEW_EVENT_CASE(PointerDown);
448+
VIEW_EVENT_CASE(PointerDownCapture);
449+
VIEW_EVENT_CASE(PointerUp);
450+
VIEW_EVENT_CASE(PointerUpCapture);
451+
VIEW_EVENT_CASE(GotPointerCapture);
452+
VIEW_EVENT_CASE(LostPointerCapture);
445453
VIEW_EVENT_CASE(MoveShouldSetResponder);
446454
VIEW_EVENT_CASE(MoveShouldSetResponderCapture);
447455
VIEW_EVENT_CASE(StartShouldSetResponder);

0 commit comments

Comments
 (0)