Fix overflowing text on web and iOS in `PostMeta` (#3982)
* `flexShrink` on iOS and web `flexShrink` on iOS and web `flexShrink` on iOS and web actually, `flexShrink` use `flex` * adjust web * `expect-error` `onMouseUp` * ignore ref type checkzio/stable
parent
d49b93dc7e
commit
e02cae2acd
|
@ -285,14 +285,14 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<View
|
||||||
|
// @ts-ignore View is being used as div
|
||||||
ref={refs.setReference}
|
ref={refs.setReference}
|
||||||
onPointerMove={onPointerMoveTarget}
|
onPointerMove={onPointerMoveTarget}
|
||||||
onPointerLeave={onPointerLeaveTarget}
|
onPointerLeave={onPointerLeaveTarget}
|
||||||
|
// @ts-ignore web only prop
|
||||||
onMouseUp={onPress}
|
onMouseUp={onPress}
|
||||||
style={{
|
style={{flexShrink: 1}}>
|
||||||
display: props.inline ? 'inline' : 'block',
|
|
||||||
}}>
|
|
||||||
{props.children}
|
{props.children}
|
||||||
{isVisible && (
|
{isVisible && (
|
||||||
<Portal>
|
<Portal>
|
||||||
|
@ -307,7 +307,7 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) {
|
||||||
</div>
|
</div>
|
||||||
</Portal>
|
</Portal>
|
||||||
)}
|
)}
|
||||||
</div>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,6 @@ const styles = StyleSheet.create({
|
||||||
},
|
},
|
||||||
maxWidth: {
|
maxWidth: {
|
||||||
flex: isAndroid ? 1 : undefined,
|
flex: isAndroid ? 1 : undefined,
|
||||||
maxWidth: !isAndroid ? '80%' : undefined,
|
flexShrink: isAndroid ? undefined : 1,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue