Giter Site home page Giter Site logo

Comments (5)

eyaleizenberg avatar eyaleizenberg commented on July 1, 2024

@chirag04 Any chance to look into this?

from react-native-tooltip.

wwwdata avatar wwwdata commented on July 1, 2024

@eyaleizenberg did you find a solution for this? I have the exact same problem i have a list view with chat messages in it and while the keyboard is open i want to open the tooltip menu to offer some options like copy the chat message but that makes the text input field loose the focus and then the keyboard closes and the tooltip is hanging around in the middle of the screen :D

from react-native-tooltip.

eyaleizenberg avatar eyaleizenberg commented on July 1, 2024

@wwwdata Nope sorry.

from react-native-tooltip.

wwwdata avatar wwwdata commented on July 1, 2024

I did a little research and at least I think I know why this happens now. When the UIMenuController is displayed, it dispatches (inside Xcode implementation) an event to become the first responder. This first responder logic also applies for TextInput fields and when they are the first responder, they display the keyboard. So if you take that away from the TextInput field, it will hide the keyboard.. see apple docs: https://developer.apple.com/documentation/uikit/uiresponder

Now I just need to find out how to get around that because this is also made in other chat apps like Telegram. So I guess I have to do something in XCode to open the menu without it being the first responder?

from react-native-tooltip.

wwwdata avatar wwwdata commented on July 1, 2024

There are some crazy workarounds that involve subclassing the UITextField just to avoid handling the event.. @chirag04 do you have any idea how this could be achieved in react native in a sane and easy way? Or can this hack described here also somehow be applied to this plugin? https://stackoverflow.com/questions/13601643/uimenucontroller-hides-the-keyboard

from react-native-tooltip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.