-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix: tooltips not working as expected #3765
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
Changes from all commits
fac9c4e
8f1e990
122de5d
46c808d
92b5b3a
158c77c
d38bd04
a1c30a6
39f257b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -125,10 +125,15 @@ const Tooltip = ({ | |||
| clearTimeout(hideTooltipTimer.current); | ||||
| } | ||||
|
|
||||
| showTooltipTimer.current = setTimeout(() => { | ||||
| if (isWeb) { | ||||
| showTooltipTimer.current = setTimeout(() => { | ||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if I want to have an enterTouchDelay on mobile? Since the base component is a Pressable now, would it be possible to replace this prop
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changing prop would be a breaking change and require releasing new version.
|
||||
| touched.current = true; | ||||
| setVisible(true); | ||||
| }, enterTouchDelay) as unknown as NodeJS.Timeout; | ||||
| } else { | ||||
| touched.current = true; | ||||
| setVisible(true); | ||||
| }, enterTouchDelay) as unknown as NodeJS.Timeout; | ||||
| } | ||||
| }; | ||||
|
|
||||
| const handleTouchEnd = () => { | ||||
|
|
@@ -179,7 +184,7 @@ const Tooltip = ({ | |||
| backgroundColor: theme.isV3 | ||||
| ? theme.colors.onSurface | ||||
| : theme.colors.tooltip, | ||||
| ...getTooltipPosition(measurement as Measurement), | ||||
| ...getTooltipPosition(measurement as Measurement, children), | ||||
| borderRadius: theme.roundness, | ||||
| ...(measurement.measured ? styles.visible : styles.hidden), | ||||
| }, | ||||
|
|
@@ -229,7 +234,6 @@ const styles = StyleSheet.create({ | |||
| }, | ||||
| pressContainer: { | ||||
| cursor: 'default', | ||||
| alignSelf: 'flex-start', | ||||
| } as ViewStyle, | ||||
| }); | ||||
|
|
||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pac-guerreiro remember why it was added there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like without added
{...rest},Tooltipis not displayed over theFABon the web.