Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3386,6 +3386,11 @@ const CONST = {
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
IMAGE: 'image',

/**
* @deprecated Please stop using the accessibilityRole prop and use the role prop instead.
*/
TEXTBOX: 'textbox',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give me a small explanation why this will fix the issue?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we use isMarkdownEnabled: true, the activeElementRole in here is textbox, so shouldDisableEnterShortcut in here is false, that why pressing on enter does not add a new line. So we need to make sure when the markdown input is focused, shouldDisableEnterShortcut is true, by adding texbox to CONST.ACCESSIBILITY_ROLE

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shubham1206agra Can you help check it?

Comment thread
tienifr marked this conversation as resolved.
},
/**
* Acceptable values for the `role` attribute on react native components.
Expand Down
1 change: 1 addition & 0 deletions src/pages/RoomDescriptionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ function RoomDescriptionPage({report, policies}: RoomDescriptionPageProps) {
value={description}
onChangeText={handleReportDescriptionChange}
autoCapitalize="none"
isMarkdownEnabled

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes the newValue argument of Report.updateDescription() to markdown, causing issue #61847. Fixed in PR #62636.

/>
</View>
</FormProvider>
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/WorkspaceNewRoomPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ function WorkspaceNewRoomPage({policies, reports, formState, session, activePoli
maxLength={CONST.REPORT_DESCRIPTION.MAX_LENGTH}
autoCapitalize="none"
shouldInterceptSwipe
isMarkdownEnabled
/>
</View>
<View style={[styles.mhn5]}>
Expand Down