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

Tooltip go off screen #48

Open
ilariowiz opened this issue Nov 4, 2020 · 2 comments
Open

Tooltip go off screen #48

ilariowiz opened this issue Nov 4, 2020 · 2 comments

Comments

@ilariowiz
Copy link

showTooltip(target, parent, text) {
    RNTooltips.Show(
	target,
	parent,
	{
		text: text,
		tintColor: '#ffffff',
		textColor: '#4a4a4a',
		textSize: 16,
		duration: 1000,
		corner: 8,
		clickToHide: true,
		autoHide: true,
		duration: 3
	}
    )
}
<View ref={ref => this.parent = ref}>
    <View>
        <ScrollView>
            <View>
                <TouchableOpacity ref={ref => this.target = ref} onPress={() => this.showTooltip(this.target, this.parent, 'hello')}>
                </TouchableOpacity>
            </View>
        </ScrollView>
    <View> 
</View>

I'm testing with iOS 14.1, I noticed that with some dimensions there are no problems, for example setting width: 200 on the parent, but on the same component putting width: 300 or width: '100%' the tooltip goes off screen

@armata99
Copy link

I have same problem on android, my screen is on landscape mode and the tooltip at the corner overlaps the OS soft keys.
It also has a small offset on LANDSCAPE_RIGHT but its ok on the LANDSCAPE_LEFT

@St1ggy
Copy link

St1ggy commented Mar 23, 2021

I have same problem on ios if element close to screen edge
image
in Example folder
image

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

3 participants