ionic-team / ionic-team/capacitor-plugins

[@capacitor/dialog] Dialog doesn't open when another Controller is Presenting

Open
#2,404 0 comments 0 reactions 0 assignees View on GitHub
platform: ios
Dominant language
Java
Stars
678
Forks
685
Avg merge
4d 22h
Merged PRs (30d)
3

Description

## Bug Report

### Plugin(s)
"@capacitor/android": "^7.4.0",
"@capacitor/app": "7.0.1",
"@capacitor/core": "7.4.3",
"@capacitor/device": "^7.0.2",
"@capacitor/dialog": "^7.0.2",
"@capacitor/haptics": "7.0.1",
"@capacitor/ios": "^7.4.0",
"@capacitor/keyboard": "7.0.1",
"@capacitor/splash-screen": "^7.0.2",
"@capacitor/status-bar": "7.0.1",
"@capgo/capacitor-native-biometric": "^7.1.13",
"@capgo/inappbrowser": "^7.16.4",

### Capacitor Version
```
💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 7.4.3
@capacitor/core: 7.4.3
@capacitor/android: 7.4.3
@capacitor/ios: 7.4.3

Installed Dependencies:

@capacitor/cli: 7.4.0
@capacitor/android: 7.4.3
@capacitor/core: 7.4.3
@capacitor/ios: 7.4.3

[success] iOS looking great! 👌
[success] Android looking great! 👌
```

### Platform(s)
iOS

### Current Behavior
When trying to present the Dialog when the InAppBrowser is on top, the dialog won't show and the following error is silently raised in the iOS console:

```
Attempt to present on (from ) which is already presenting .
`````

### Expected Behavior
Same as on Android. The dialog should open above the InAppBrowser

### Code Reproduction
- Create a new ionic app for both android and ios
- install the @capgo/inappbrowser and @capacitor/dialog plugins
- open a page with the InAppBrowser plugin, using the webview options

```
await InAppBrowser.openWebView({
url: link,
toolbarType: ToolBarType.COMPACT,
activeNativeNavigationForWebview: true,
title,
toolbarColor: DEFAULT_COLOR,
toolbarTextColor: '#ffffff',
});
```

- while the Browser is opened, try to trigger an alert:
```
await Dialog.alert({
title: 'title',
message: 'Message ',
buttonTitle: 'Close',
});
```

### Other Technical Details

### Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.