mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fixes Dev menu pop up multiple times when Tap command D continuously (#41234)
Summary: Fixes Dev menu pop up multiple times when Tap command `D` continuously, demo like below: https://github.com/facebook/react-native/assets/5061845/b4c2b38d-ece6-4d4e-a823-23eaa7cad001 ## Changelog: [IOS] [FIXED] - Fixes Dev menu pop up multiple times when Tap command `D` continuously Pull Request resolved: https://github.com/facebook/react-native/pull/41234 Test Plan: Press `D` continuously, the menu pop up and dismiss correctly. Reviewed By: cipolleschi Differential Revision: D50925959 Pulled By: blakef fbshipit-source-id: 50fac9b4cea94c15a06ebc1b6092ebc9909cd9d2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d6163d7f43
commit
a257e9f5f0
@@ -211,11 +211,15 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
- (void)toggle
|
||||
{
|
||||
if (_actionSheet.isBeingPresented || _actionSheet.beingDismissed) {
|
||||
return;
|
||||
}
|
||||
if (_actionSheet) {
|
||||
[_actionSheet dismissViewControllerAnimated:YES
|
||||
completion:^(void){
|
||||
completion:^(void) {
|
||||
self->_actionSheet = nil;
|
||||
}];
|
||||
_actionSheet = nil;
|
||||
|
||||
} else {
|
||||
[self show];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user