Skip to content
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: App focuses back on composer even if RHN is open on copy link from app download link in about settings #29254

Merged
merged 2 commits into from
Oct 12, 2023
Merged
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
7 changes: 7 additions & 0 deletions src/libs/ReportActionComposeFocusManager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import {TextInput} from 'react-native';
import ROUTES from '../ROUTES';
import Navigation from './Navigation/Navigation';

type FocusCallback = () => void;

Expand Down Expand Up @@ -28,6 +30,11 @@ function onComposerFocus(callback: FocusCallback, isMainComposer = false) {
* Request focus on the ReportActionComposer
*/
function focus() {
/** Do not trigger the refocusing when the active route is not the report route, */
if (!Navigation.isActiveRoute(ROUTES.REPORT_WITH_ID.getRoute(Navigation.getTopmostReportId() ?? ''))) {
Copy link
Member

@rushatgabhane rushatgabhane Jul 26, 2024

Choose a reason for hiding this comment

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

Coming from #44078
This works for report but not when reportAction is also in the URL

return;
}

if (typeof focusCallback !== 'function') {
if (typeof mainComposerFocusCallback !== 'function') {
return;
Expand Down
Loading