-
Notifications
You must be signed in to change notification settings - Fork 10
Implement keyboardDidHide listener and open modal if the Keyboard appears #10
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
Implement keyboardDidHide listener and open modal if the Keyboard appears #10
Conversation
|
@danieldoglas when user currently focuses on input and select picker and close picker, should we focus back to original input? |
|
@0xmiroslav I don't think we should go back to the original input, we should just close. I'm addressing internally why I can't assign you to this PR, I think we have some permission issues here. Will get back to you soon. |
|
@0xmiroslav can you try to review this PR without me assigning you? |
Sure thing |
0xmiros
left a comment
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.
Code mostly looks good. Just minor feedback:
src/index.js
Outdated
|
|
||
| if (Keyboard.isVisible()) { | ||
| const keyboardListener = Keyboard.addListener('keyboardDidHide', () => { | ||
| this.updatePickerState(animate,postToggleCallback); |
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.updatePickerState(animate,postToggleCallback); | |
| this.updatePickerState(animate, postToggleCallback); |
src/index.js
Outdated
| Keyboard.dismiss(); | ||
| } | ||
| else { | ||
| this.updatePickerState(animate,postToggleCallback); |
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.updatePickerState(animate,postToggleCallback); | |
| this.updatePickerState(animate, postToggleCallback); |
src/index.js
Outdated
| } | ||
| else { |
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.
| } | |
| else { | |
| } else { |
|
all comments have already been resolved |
|
@OlimpiaZurek please pull from master and fix lint. Not related to this PR but asking since you also worked on #9. - const preserveSpaces = (label) => {
+ const preserveSpaces = (label) => {
return label.replace(/ /g, '\u00a0');
- }
+ }And it would be good to add some automated tests. |
done |
0xmiros
left a comment
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.
Looks good, tests well, automated tests pass.
Checklist will be done in app PR.
cc: @danieldoglas
Original issue: $Expensify/App#16353
This PR changes implementation on Keyboard dismiss inside
togglePickermethod. In current implementationKeyboard.dismiss()is called immediately, which can caused issues ( eg. Expensify/App#16353).I added listener
keyboardDidHideand open modal if the Keyboard appears. Otherwise just open modal.