Skip to content

Bug on Toast with keyboard open #13

@fqr1

Description

@fqr1

I have a Button that triggers the Toast, and a TextInput that triggers the Toast too,
If I press one and wait until is closed, to trigger the second Toast, it works normally (for example, press the button, wait until the Toast is close, and write in the TextInput)

But the problem goes when the second Toast is shown, but the first Toast is not closed yet. The message is shown twice in the device

Usage example:
http://g.recordit.co/0gAmNo30LQ.gif

Image

Code:

import React, {Component} from 'react';
import {
    View, StyleSheet, Text, Button, TextInput
} from 'react-native';

import Toast from 'react-native-toast-native';

class ToastComponent extends Component {

    onChange(){
        Toast.show(
            'onChange toast.',
            Toast.LONG,
            Toast.BOTTOM
        );
    }

    buttonPressed(){
        Toast.show(
            'Button toast.',
            Toast.LONG,
            Toast.BOTTOM
        );
    }

    render() {
        return (
            <View style={styles.main}>
                <Text>react-native-toast-native</Text>
                <Button title="Button" onPress={this.buttonPressed.bind(this)}/>
                <TextInput onChange={this.onChange.bind(this)} style={styles.input}/>
            </View>
        );
    }
}

const styles = new StyleSheet.create({
    main: {},
    input: {
        backgroundColor: 'lightblue'
    }
});

export default ToastComponent;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions