Skip to content

Commit 8efcd35

Browse files
committed
Only set userSelect:auto on anchor tags (native)
Fix #314
1 parent b3ca678 commit 8efcd35

4 files changed

Lines changed: 1 addition & 122 deletions

File tree

packages/react-strict-dom/src/native/modules/createStrictDOMTextComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function createStrictDOMTextComponent<T, P: StrictProps>(
4545
*/
4646

4747
const defaultProps = {
48-
style: [_defaultProps?.style, styles.userSelectAuto]
48+
style: [_defaultProps?.style, tagName === 'a' && styles.userSelectAuto]
4949
};
5050

5151
const { customProperties, nativeProps, inheritableStyle } =

packages/react-strict-dom/tests/__snapshots__/compat-test.native.js.snap-native

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ exports[`<compat.native> nested: nested 1`] = `
102102
"boxSizing": "content-box",
103103
"color": "red",
104104
"position": "static",
105-
"userSelect": "auto",
106105
}
107106
}
108107
>

0 commit comments

Comments
 (0)