-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix link is shown in a separate line #20440
Changes from 1 commit
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 |
---|---|---|
@@ -1,22 +1,20 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import * as anchorForCommentsOnlyPropTypes from './anchorForCommentsOnlyPropTypes'; | ||
import BaseAnchorForCommentsOnly from './BaseAnchorForCommentsOnly'; | ||
import * as DeviceCapabilities from '../../libs/DeviceCapabilities'; | ||
import ControlSelection from '../../libs/ControlSelection'; | ||
import styles from '../../styles/styles'; | ||
|
||
const AnchorForCommentsOnly = (props) => ( | ||
<BaseAnchorForCommentsOnly | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
{...props} | ||
onPressIn={() => DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()} | ||
onPressOut={() => ControlSelection.unblock()} | ||
// HTML renderer root view display is flex. Using flex will force all child elements | ||
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. Removed this comment because actually we can use the display inline, so I think the comment is not valid anymore. 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. @bernhardoj can you please tell me the purpose of this View wrapper with display inline here? I am checking all the related issues to make sure it doesn't break anything but just wanted to get your opinion. |
||
// to be block elements even when they have display inline added to them. | ||
// This will affect elements like <a> which are inline by default. | ||
// Setting display block to the container view will solve that. | ||
containerStyles={[styles.dBlock]} | ||
/> | ||
<View style={styles.dInline}> | ||
<BaseAnchorForCommentsOnly | ||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
{...props} | ||
onPressIn={() => DeviceCapabilities.canUseTouchScreen() && ControlSelection.block()} | ||
onPressOut={() => ControlSelection.unblock()} | ||
/> | ||
</View> | ||
); | ||
|
||
AnchorForCommentsOnly.propTypes = anchorForCommentsOnlyPropTypes.propTypes; | ||
|
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.
Removed the View from here and move it to AnchorForCommentsOnly/index.js. Having a view here will misaligned the text in native.
![image](https://private-user-images.githubusercontent.com/50919443/244266290-0a9002b3-ea85-4e1b-a72f-35ff233f7eaa.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjIzNTYsIm5iZiI6MTczOTM2MjA1NiwicGF0aCI6Ii81MDkxOTQ0My8yNDQyNjYyOTAtMGE5MDAyYjMtZWE4NS00ZTFiLWE3MmYtMzVmZjIzM2Y3ZWFhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDEyMDczNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTYyN2Q0NzYyNTY4ZWMxYmYyYWM4ODczOWY5MWVkNTEyNjkwYzk0ODI3ZTljY2UwZTRjNTY3MDNiN2UxZjJmODkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.g9VrIxkgYnNk_CtzVCOJVs8TltURaMhHBIf-8YpUC5w)