question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS/TextInput] Impossibility to use `inputAccessoryView`

See original GitHub issue

Is this a bug report?

It is a incorrect behavior introduced in version 0.47.0, commit https://github.com/facebook/react-native/commit/2b1795c5add2e1442878a884d6dcd8f0ec5c1572

This commit brought a problem to those who use a custom ToolBar in TextInput, like IQKeyboardManager. And there is no option to disable this behavior.

Environment

Environment: OS: macOS Sierra 10.12.6 Node: 6.11.0 Yarn: 1.0.2 npm: 5.4.2 Watchman: 4.9.0 Xcode: Xcode 9.0 Build version 9A235 Android Studio: EAP AI-171.4316950 AI-171.4316950

Packages: (wanted => installed) react: 16.0.0-alpha.12 => 16.0.0-alpha.12 react-native: 0.48.2 => 0.48.2

Steps to Reproduce

  1. $ clone https://github.com/douglasjunior/react-native-inputAccessoryView.git
  2. $ cd react-native-inputAccessoryView
  3. $ yarn install
  4. $ react-native run-ios

Expected Behavior

It is expected that when typing, the Toolbar will not disappear. As in react-native 0.46.4.

correct

Actual Behavior

When typing, the Toolbar disappears, because the inputAccessoryView is set to null.

incorrect

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
shergincommented, Oct 5, 2017

Okay, I will fix that, I think I know how to do it. I am doing it because:

  • Seems it will not increase complexity of current implementation;
  • I cannot guarantee that it will work forever because… see the previous point;
  • RN does not support customizing inputAccessoryView;
  • I love you, guys.
5reactions
shergincommented, Oct 10, 2017

@douglasjunior bf3698323d81508fc77174df2b1ffe5fb03224e7 should fix your problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a view on top of the keyboard using InputAccessoryView
A keyboard can only be displayed if a UITextField or UITextView is on the screen and gains focus. So you need to connect...
Read more >
React Native Ios Inputaccessoryview Disappear From The ...
Idan I use WebView in react native and when click. React native IOS InputAccessoryView disappear from the screen after close modal. From Dev....
Read more >
inputAccessoryView | Apple Developer Documentation
The custom input accessory view to display when the responder becomes the first ... You can then use this property to manage a...
Read more >
InputAccessoryView - React Native
This component can be used to create custom toolbars. To use this component wrap your custom toolbar with the InputAccessoryView component, and ...
Read more >
Building <InputAccessoryView> For React Native - Medium
There are two main use cases of InputAccessoryView. You can create a view like Facebook composer view picker; You can also design a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found