wix-incubator / react-native-keyboard-input

Use your own custom input component instead of the system keyboard
MIT License
819 stars 150 forks source link

start OnGlobalLayoutListener listening on Object creation, not on Class #44

Closed armbox closed 6 years ago

armbox commented 6 years ago

start OnGlobalLayoutListener listening on Object creation, not on Class loading.

the onGlobalLayout callback can be called before RN JS module has initialized. So it can cause a crash depends on timing(such as debugger loading).

d4vidi commented 6 years ago

@armbox as far as i understand it this is a no-fix since the listener is not static, and thus is already initialized at object creation.

armbox commented 6 years ago

Yes you are correct I realize that just after sent the PR. However, the callback is happening before the js engine is initialized. Please fix it correctly.

Thanks