Coder Social home page Coder Social logo

Question: tvOS: When using tvos remote, UISearchController keyboard events are not propagated to UISearchBar's Text Input Field about react-native-tvos HOT 6 CLOSED

react-native-tvos avatar react-native-tvos commented on September 28, 2024
Question: tvOS: When using tvos remote, UISearchController keyboard events are not propagated to UISearchBar's Text Input Field

from react-native-tvos.

Comments (6)

douglowder avatar douglowder commented on September 28, 2024

React does intercept remote events, in RCTTVRemoteHandler.m. You might need to modify that file in order to allow your search controller to get the events.

from react-native-tvos.

douglowder avatar douglowder commented on September 28, 2024

@keshavkaul were you able to resolve this issue?

from react-native-tvos.

keshavkaul avatar keshavkaul commented on September 28, 2024

@dlowder-salesforce No, I didn't find time to resolve this, but I implemented a quick fix to natively present a search controller as a modal instead of embedding the controller in react native view

from react-native-tvos.

hscheidl avatar hscheidl commented on September 28, 2024

I'm facing the same issue, but I can't figure out how to avoid RCTTVRemoteHandler.m from intercepting remote events just for the search controller. Has anybody integrated successfully the search bar? Is there a work-around besides showing it as a modal?

from react-native-tvos.

zsoltbokor avatar zsoltbokor commented on September 28, 2024

Hi, we also have UISearchController used in our project and had issues mostly with remote with touch.
Sometimes touch event (gestures) were not propagated to the keyboard.
After dubugging it found out that there is a RCTTouchHandler registered in React/Base/RCTRootContentView.m so basically 2 gesture handlers were registered and the one useful for mobiles was preventing gesture handling.
RCTTouchHandler has internally a function canBePreventedByGestureRecognizer which was returning true in our case.

The RCTTVRemoteHandler .m already has gesture handler implementation so in case of RCTRootContentView we just skip to register the RCTTouchHandler if TV device.

from react-native-tvos.

douglowder avatar douglowder commented on September 28, 2024

@zsoltbokor if you are using recent RNTV (0.72 latest, or 0.73), the RCTTouchHandler has been removed for Apple TV, see #601 .

from react-native-tvos.

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.