-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Adding fix for Manual set value clearTextOnSubmit-style behavior not working on Fabric #15277
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
Closed
+122
−19
Closed
Changes from 10 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
d9ad94e
adding fix for TextInput
0e83625
Change files
8dde8cc
Merge branch 'main' into textInput-15168
protikbiswas100 da2a4bf
Update change/react-native-windows-daac39ef-4292-4f66-81ae-708b1c0f66…
protikbiswas100 13473ed
changed logic for native and js side event count
4c8e428
Merge branch 'textInput-15168' of https://github.com/protikbiswas100/…
8771b9e
adding formatting changes
66e141d
adding linting fix
89c3b49
Remove packages/playground/Samples/textInputSubmitIssue.tsx
d00e1c4
Removing additional imports
fcd447b
changing logic for synchronization
528c58b
fixing linting issue
8a5fa68
adding snapshots
c4ab9c0
chnaging the logic on synchronization between JS and Native side
b9ff842
fixing linting error
2068ef7
removing e2e test
ab4fa57
Merge branch 'main' into textInput-15168
protikbiswas100 6d1a24b
changing synchronization logic between JS and Native side
73dc3d1
changing logic to avoid some difference between JS and Native layer e…
877fd6a
adding format change
b1ef624
adding header and adding new field
802abdf
fixing linting issue
ce7cb97
Merge branch 'main' into textInput-15168
protikbiswas100 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/react-native-windows-daac39ef-4292-4f66-81ae-708b1c0f6676.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "comment": "Fix TextInput clearTextOnSubmit-style behavior regression in Fabric architecture", | ||
| "type": "prerelease", | ||
| "packageName": "react-native-windows", | ||
| "email": "protikbiswas100@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 is still breaking the synchronization logic. What if they do two setValue calls from JS. Or 3. Then the event count would be 2 or 3 values off.
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.
I changed the logic here again, I see your point.
Solution:
Ntaive filres onSubmitEditing with eventCount = m_nativeEventCount (current count N)
JS received the event with eventCount = N
JS immediately calls setValue('') with eventCount = N
Native accepts N >= N (which is true)
The Native increments count for future events