diff options
author | Hailey <me@haileyok.com> | 2024-02-06 09:00:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-06 09:00:16 -0800 |
commit | 065a09408767a870c48c99549cc0198955ea1ccf (patch) | |
tree | 65474dcd1dade94870b7318dbc27004ea0b53835 /src/view/com/util/Link.tsx | |
parent | 2f1ce117d7db8db168303f6064e69024e920585e (diff) | |
download | voidsky-065a09408767a870c48c99549cc0198955ea1ccf.tar.zst |
fix web aux click on all browsers (#2633)
Diffstat (limited to 'src/view/com/util/Link.tsx')
-rw-r--r-- | src/view/com/util/Link.tsx | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/view/com/util/Link.tsx b/src/view/com/util/Link.tsx index a517ba430..afbdeb8f4 100644 --- a/src/view/com/util/Link.tsx +++ b/src/view/com/util/Link.tsx @@ -31,6 +31,7 @@ import {PressableWithHover} from './PressableWithHover' import FixedTouchableHighlight from '../pager/FixedTouchableHighlight' import {useModalControls} from '#/state/modals' import {useOpenLink} from '#/state/preferences/in-app-browser' +import {WebAuxClickWrapper} from 'view/com/util/WebAuxClickWrapper' type Event = | React.MouseEvent<HTMLAnchorElement, MouseEvent> @@ -104,17 +105,19 @@ export const Link = memo(function Link({ ) } return ( - <TouchableWithoutFeedback - testID={testID} - onPress={onPress} - accessible={accessible} - accessibilityRole="link" - {...props}> - {/* @ts-ignore web only -prf */} - <View style={style} href={anchorHref}> - {children ? children : <Text>{title || 'link'}</Text>} - </View> - </TouchableWithoutFeedback> + <WebAuxClickWrapper> + <TouchableWithoutFeedback + testID={testID} + onPress={onPress} + accessible={accessible} + accessibilityRole="link" + {...props}> + {/* @ts-ignore web only -prf */} + <View style={style} href={anchorHref}> + {children ? children : <Text>{title || 'link'}</Text>} + </View> + </TouchableWithoutFeedback> + </WebAuxClickWrapper> ) } |