apache / apache/cordova-plugin-camera
Status bar overlaps content after closing the camera [iOS]
- Dominant language
- Objective-C
- Stars
- 976
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
In iOS 13 and 14 after closing the camera (either taking a photo or cancel it) the content of the WebView goes beneath the status bar and can't go back anymore. It works fine in iOS 15. I've seen some posts referring to this problem where they mention that was cordova-plugin-statusbar fault but we don't have it installed.
I've seen a [suggestion ](https://github.com/apache/cordova-plugin-statusbar/issues/156#issuecomment-534862712) to change this value to "NO" but that didn't work either (https://github.com/jjtfsalgado/cordova-plugin-camera/commit/d498b3bf858147d43538f54cfc25f67439ed28b0)
Do you guys have any suggestions?
## Problem
### What is expected to happen?

### What does actually happen?

## Information
As mention above it works fine in iOS 15 (and 12) but not in iOS 13 and 14.
### Command or Code
This is our config.xml (excluding android)
```
This app needs the camera for attachments
This app needs to access your photo gallery for attachments
```
### Environment, Platform, Device
iPhone 11 - iOS 14.7.1
iPhone 11 - iOS 14.8
iPhone X - iOS 13.7
### Version information
```
"dependencies": {
"@electron/typescript-definitions": "^8.9.4",
"@havesource/cordova-plugin-push": "2.0.0",
"@types/cordova": "^0.0.34",
"@types/react": "^17.0.13",
"@types/react-dom": "^17.0.8",
"cordova-android": "^9.1.0",
"cordova-ios": "^6.2.0",
"cordova-plugin-camera": "^6.0.0",
"cordova-plugin-customurlscheme": "^5.0.2",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-inappbrowser": "github:xxx/cordova-plugin-inappbrowser#5.0.x",
"cordova-plugin-secure-storage-echo": "github:xxx/cordova-plugin-secure-storage",
"cross-env": "^7.0.3",
"cordova-plugin-androidx-adapter": "1.1.3",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-fingerprint-aio": "4.0.2",
"cordova-plugin-network-information": "^2.0.2",
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-whitelist": "^1.3.4",
"oidc-client": "^1.11.5",
"file-loader": "^6.2.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"styled-components": "^5.3.0",
"ts-loader": "^9.2.3",
"typescript": "^4.2.4",
"webpack": "^5.42.0",
"webpack-cli": "^4.7.2",
"xml-formatter": "^2.6.1",
"xml2json": "^0.11.2"
}
```
## Checklist
- [ X] I searched for existing GitHub issues
- [ X] I updated all Cordova tooling to most recent version
- [ X] I included all the necessary information above
Contributor guide
Research direction
Reproduce the camera-close flow using the supplied config.xml on iOS 13.7, 14.7.1, 14.8, and 15, comparing photo capture and cancellation. Inspect the cordova-plugin-camera iOS lifecycle around dismissal and verify that the WebView no longer sits beneath the status bar after either path completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100