File tree 2 files changed +22
-27
lines changed
2 files changed +22
-27
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,6 @@ function PopoverReportActionContextMenu(_props: unknown, ref: ForwardedRef<Repor
242
242
reportIDRef . current = '-1' ;
243
243
reportActionIDRef . current = '-1' ;
244
244
originalReportIDRef . current = '-1' ;
245
- setInstanceID ( '' ) ;
246
245
247
246
onPopoverHide . current = runAndResetCallback ( onPopoverHide . current ) ;
248
247
onPopoverHideActionCallback . current = runAndResetCallback ( onPopoverHideActionCallback . current ) ;
Original file line number Diff line number Diff line change @@ -123,37 +123,33 @@ function showContextMenu(
123
123
if ( ! contextMenuRef . current ) {
124
124
return ;
125
125
}
126
- const show = ( ) => {
127
- contextMenuRef . current ?. showContextMenu (
128
- type ,
129
- event ,
130
- selection ,
131
- contextMenuAnchor ,
132
- reportID ,
133
- reportActionID ,
134
- originalReportID ,
135
- draftMessage ,
136
- onShow ,
137
- onHide ,
138
- isArchivedRoom ,
139
- isChronosReport ,
140
- isPinnedChat ,
141
- isUnreadChat ,
142
- disabledActions ,
143
- shouldCloseOnTarget ,
144
- setIsEmojiPickerActive ,
145
- isOverflowMenu ,
146
- ) ;
147
- } ;
148
-
149
126
// If there is an already open context menu, close it first before opening
150
127
// a new one.
151
128
if ( contextMenuRef . current . instanceID ) {
152
- hideContextMenu ( false , show ) ;
153
- return ;
129
+ hideContextMenu ( ) ;
130
+ contextMenuRef . current . runAndResetOnPopoverHide ( ) ;
154
131
}
155
132
156
- show ( ) ;
133
+ contextMenuRef . current . showContextMenu (
134
+ type ,
135
+ event ,
136
+ selection ,
137
+ contextMenuAnchor ,
138
+ reportID ,
139
+ reportActionID ,
140
+ originalReportID ,
141
+ draftMessage ,
142
+ onShow ,
143
+ onHide ,
144
+ isArchivedRoom ,
145
+ isChronosReport ,
146
+ isPinnedChat ,
147
+ isUnreadChat ,
148
+ disabledActions ,
149
+ shouldCloseOnTarget ,
150
+ setIsEmojiPickerActive ,
151
+ isOverflowMenu ,
152
+ ) ;
157
153
}
158
154
159
155
/**
You can’t perform that action at this time.
0 commit comments