Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Android, I cannot delete a tag using "backspace" #31

Closed
richthedev opened this issue May 29, 2017 · 9 comments
Closed

On Android, I cannot delete a tag using "backspace" #31

richthedev opened this issue May 29, 2017 · 9 comments

Comments

@richthedev
Copy link

Works great on iOS, but on Android nothing happens.

@zarcode
Copy link

zarcode commented Sep 7, 2017

@richthedev found any solution?

@zarcode
Copy link

zarcode commented Sep 8, 2017

@jwohlfert23 any suggestion how we can fix this?

@jwohlfert23
Copy link
Owner

I will look into this over the weekend and let you know. Thanks for the heads up about the issue.

@zarcode
Copy link

zarcode commented Sep 17, 2017

@jwohlfert23 thanks for response. Any progress?

@Ashoat
Copy link
Collaborator

Ashoat commented Sep 18, 2017

The reason for this is that the onKeyPress callback is only supported on iOS at the moment. This issue tracks it: #1882.

There's a workaround for this, which is to use the onChange callback. However, it won't work in our case because it doesn't fire when backspace is typed but the TextInput is empty.

In other words, there is literally no way to do this on Android in React Native at the moment.

There are a couple PRs out there. #14720 seems to be the most promising one.

@joshjhargreaves
Copy link

Hi @Ashoat, I’m looking to finish off the PR and get it landed. Hopefully this will be possible soon!

@joshjhargreaves
Copy link

@Ashoat do you think you could test the PR to see if it works as you'd expect (to fix this open issue)? facebook/react-native#14720. Thanks!

@Ashoat
Copy link
Collaborator

Ashoat commented Oct 16, 2017

@joshyhargreaves - I went ahead and gave it a try, but I couldn't get the Android version to build, even after running react-native eject.

I basically tried:

$ npm install git+https://git@github.com/joshyhargreaves/react-native.git#implement_onKeyPress_android
$ rm -rf node_modules
$ cd Example
$ npm install git+https://git@github.com/joshyhargreaves/react-native.git#implement_onKeyPress_android
$ rm -rf node_modules
$ yarn
$ rm -rf ios
$ rm -rf android
$ react-native eject
$ react-native run-android

Here's the full error: https://gist.github.com/Ashoat/83a8dd7602e9a2b06c6afa409210c94e

@Ashoat
Copy link
Collaborator

Ashoat commented Feb 10, 2018

Thanks to @joshyhargreaves this is now working on React Native 0.53!

@Ashoat Ashoat closed this as completed Feb 10, 2018
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

No branches or pull requests

5 participants