This repository was archived by the owner on Mar 7, 2025. It is now read-only.
Improve Focus/Blur handling and show the keyboard accordingly#75
Merged
Improve Focus/Blur handling and show the keyboard accordingly#75
Conversation
mzorz
approved these changes
Nov 22, 2018
Contributor
mzorz
left a comment
There was a problem hiding this comment.
LGTM, does everything as advertised.
Note for future reference, the mentioned "fix" lies in the overriden @Override public boolean requestFocus method where a call to showSoftKeyboard is made.
This was referenced Nov 22, 2018
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.
This PR does fix the issue where the keyboard is not shown on the screen when you tap on a AztecWrapper field in RN applications.
It also add 2 other new features (one of those were already present but never exposed to JS) for focus/blur handling in JS.
Details:
Adds the ability to listen on blur and focus events from the JS side. We can now use
onBlur, andonFocusand attach a JS function to it.Does fix an issue where the keyboard is not shown on the screen when the edit field get the focus.
Adds the ability to set focus or unset it via JS. There are 2 new commands (
focusTextInputandblurTextInput) that can be invoked JS side to trigger the native side to get or lost the focus.Test 1
onBlurandonFocuslog lines are present in the log when you jump between fieldsTest 2 (External test with a RN app)
gb-mobilemaster and point react-native-aztec to this hash 357a9a4gb-mobileapp, and tap/jump between AztecWrapper powered blocksI will provide a GB-mobile side PR once this is merged in
master