Skip to content

Commit

Permalink
fix perf-test
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Oct 10, 2024
1 parent c61aa1a commit 4e20be9
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import Navigation from '@libs/Navigation/Navigation';
import * as ReportUtils from '@libs/ReportUtils';
import * as SubscriptionUtils from '@libs/SubscriptionUtils';
import * as IOU from '@userActions/IOU';
import * as Modal from '@userActions/Modal';
import * as Report from '@userActions/Report';
import * as Task from '@userActions/Task';
import DelegateNoAccessModal from '@src/components/DelegateNoAccessModal';
Expand Down Expand Up @@ -229,13 +230,6 @@ function AttachmentPickerWithMenuItems({
{
icon: Expensicons.Paperclip,
text: translate('reportActionCompose.addAttachment'),
onSelected: () => {
if (Browser.isSafari()) {
return;
}
triggerAttachmentPicker();
},
shouldCallAfterModalHide: true,
},
];
return (
Expand Down Expand Up @@ -322,8 +316,14 @@ function AttachmentPickerWithMenuItems({
// In order for the file picker to open dynamically, the click
// function must be called from within a event handler that was initiated
// by the user on Safari.
if (index === menuItems.length - 1 && Browser.isSafari()) {
triggerAttachmentPicker();
if (index === menuItems.length - 1) {
if (Browser.isSafari()) {
triggerAttachmentPicker();
return;
}
Modal.close(() => {
triggerAttachmentPicker();
});
}
}}
anchorPosition={styles.createMenuPositionReportActionCompose(shouldUseNarrowLayout, windowHeight, windowWidth)}
Expand Down

0 comments on commit 4e20be9

Please sign in to comment.