Skip to content

Add defensive check before registerInputHandler in view component.#233

Merged
adamstep merged 3 commits intoInstawork:masterfrom
terryatgithub:bugfix/filter-null-hv-view-inputrefs
Mar 4, 2021
Merged

Add defensive check before registerInputHandler in view component.#233
adamstep merged 3 commits intoInstawork:masterfrom
terryatgithub:bugfix/filter-null-hv-view-inputrefs

Conversation

@terryatgithub
Copy link
Copy Markdown
Contributor

@terryatgithub terryatgithub commented Mar 4, 2021

  • Requirement:
    add defensive check before registerInputHandler in view component.

  • Issue:
    Since hyperview uses KeyboardAwareScrollView in 'react-native-keyboard-aware-scrollview', if inputRefs contain null, it would cause some random problems in some certain scenarioes as below:

  1. 'Add defensive checks before calling isFocused #44',
  2. iOS: when text-field is focused, throw exception: TypeError null is not an object (evaluating 'o.isFocused') #232

@terryatgithub terryatgithub changed the title filter null ref when registerInputHandler in view component Add defensive check before registerInputHandler in view component. Mar 4, 2021
@cengit
Copy link
Copy Markdown

cengit commented Mar 4, 2021

great job!
since react-native-keyboard-aware-scrollview is not so active now, this will help to fix my issue.
it would be great to include this PR and publish new version, thanks! @adamstep

@adamstep
Copy link
Copy Markdown
Contributor

adamstep commented Mar 4, 2021

Thanks @terryatgithub !

@adamstep adamstep merged commit 172ba1f into Instawork:master Mar 4, 2021
@terryatgithub
Copy link
Copy Markdown
Contributor Author

Thanks @terryatgithub !

It's ok. Thanks for your guys's great job, we are benifiting from the features of hyperview.

@terryatgithub terryatgithub deleted the bugfix/filter-null-hv-view-inputrefs branch May 7, 2021 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants