Fix currentlyFocusedField by Removing this usage in TextInputState#19834
Closed
janicduplessis wants to merge 1 commit into
Closed
Fix currentlyFocusedField by Removing this usage in TextInputState#19834janicduplessis wants to merge 1 commit into
currentlyFocusedField by Removing this usage in TextInputState#19834janicduplessis wants to merge 1 commit into
Conversation
|
Just found this issue, realized that currentlyFocusedField was returning undefined and thus not properly avoiding the keyboard from this library: https://github.com/APSL/react-native-keyboard-aware-scroll-view/blob/master/lib/KeyboardAwareHOC.js#L301. Patching this PR does fix the issue. |
Contributor
Author
|
cc @hramos |
facebook-github-bot
approved these changes
Jul 20, 2018
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
@hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Collaborator
|
This pull request was closed by @janicduplessis in b4b594c. Once this commit is added to a release, you will see the corresponding version tag below the description at b4b594c. If the commit has a single |
CarlaTeo
pushed a commit
to projetoeureka/react-native
that referenced
this pull request
Aug 29, 2018
facebook#19834) Summary: I broke `currentlyFocusedField` when adding it back in ce3b7b8 because `this` no longer refers to the proper object because it is assigned here facebook@ce3b7b8#diff-b48972356bc8dca4a00747d002fc3dd5R330. This code was pretty prone to breaking so I simply removed the `this` usage and rely on a top level variable instead. Also moved everything to named functions. Pull Request resolved: facebook#19834 Differential Revision: D8943088 Pulled By: hramos fbshipit-source-id: 24d1470f6117138a5978fb7e467147847a9f3658
grabbou
pushed a commit
that referenced
this pull request
Sep 10, 2018
#19834) Summary: I broke `currentlyFocusedField` when adding it back in ce3b7b8 because `this` no longer refers to the proper object because it is assigned here ce3b7b8#diff-b48972356bc8dca4a00747d002fc3dd5R330. This code was pretty prone to breaking so I simply removed the `this` usage and rely on a top level variable instead. Also moved everything to named functions. Pull Request resolved: #19834 Differential Revision: D8943088 Pulled By: hramos fbshipit-source-id: 24d1470f6117138a5978fb7e467147847a9f3658
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
I broke
currentlyFocusedFieldwhen adding it back in ce3b7b8 becausethisno longer refers to the proper object because it is assigned here ce3b7b8#diff-b48972356bc8dca4a00747d002fc3dd5R330. This code was pretty prone to breaking so I simply removed thethisusage and rely on a top level variable instead. Also moved everything to named functions.Test Plan:
Tested that calling currentlyFocusedField actually returns a value if a text input is focused.
Release Notes:
[GENERAL] [BUGFIX] [TextInputState] - Fix
currentlyFocusedFieldby Removingthisusage in TextInputState