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

Switch component stop responding on Android #35

Closed
artkow opened this issue Aug 23, 2016 · 4 comments
Closed

Switch component stop responding on Android #35

artkow opened this issue Aug 23, 2016 · 4 comments
Labels

Comments

@artkow
Copy link
Contributor

artkow commented Aug 23, 2016

After pressing on Switch and move finger outside component area before releasing it the component stops working.

When I remove package react-native-facebook-account-kit and use basic react-native then Switch works all the time good.

This happens on example witch patch:

diff --git a/sample/app.js b/sample/app.js
index 49b6230..b9ba0b9 100644
--- a/sample/app.js
+++ b/sample/app.js
@@ -19,7 +19,8 @@ import AccountKit, {
 class AccountKitSample extends Component {
   state = {
     authToken: null,
-    loggedAccount: null
+    loggedAccount: null,
+    val: false
   }

   componentWillMount() {
@@ -130,7 +131,7 @@ class AccountKitSample extends Component {
           onLogin={(token) => this.onLogin(token)} onError={(e) => this.onLogin(e)}>
           <Text style={styles.buttonText}>SMS</Text>
         </LoginButton>
-
+        <Switch onValueChange={(value) => this.setState({val: value})} value={this.state.val} />
         <TouchableOpacity style={styles.button} onPress={() => this.onEmailLoginPressed()}>
           <Text style={styles.buttonText}>Email</Text>
         </TouchableOpacity>

workaround:
use in Switch function:
onResponderRelease={()=> this.setState({val: !this.state.val })}

@artkow artkow changed the title Switch component stop responding Switch component stop responding on Android Aug 23, 2016
@gaguirre
Copy link
Collaborator

Hi @artkow, what do you mean with the component stops working?
Could you post a screenshot or gif maybe? I can't reproduce it in the emulator.

@artkow
Copy link
Contributor Author

artkow commented Aug 24, 2016

Hi,
I forgot mention that this happens on android devices (no emulator). I use phone with Android ver 5.0.1 and 4.4.2.
I've done test on ios emulator and it works good too.

stop working - means stop toggle, works like slider, can be stopped during his move

@gaguirre
Copy link
Collaborator

gaguirre commented Sep 6, 2016

Sorry for the delay @artkow
I could reproduce it but don't know why it happens. I also tried removing all react-native-facebook-account-kit stuff but still fails, so it may be a React Native issue.

@gaguirre gaguirre added the bug label Mar 13, 2017
@aschenkel
Copy link
Contributor

Closing this one due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants