apache / apache/cordova-plugin-camera

plugin could be altering the safe area on iOS 13

Open
#647 4 comments 1 reaction 0 assignees View on GitHub
platform: ios
Dominant language
Objective-C
Stars
976
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

I have an app with Cordova, AngularJS 1.5, and Ionic v1.

```

ionic info

Ionic:

ionic (Ionic CLI) : 4.10.3 (C:\Users\User\node_modules\ionic)
Ionic Framework : ionic1 1.3.5
@ionic/v1-toolkit : 1.0.22

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 8.1.0, browser 5.0.4, ios 5.1.1, windows 4.4.3
Cordova Plugins : cordova-plugin-ionic-webview 4.1.3, (and 17 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\User\Documents\Android\sdk)
NodeJS : v10.21.0 (C:\Program Files\nodejs\node.exe)
npm : 6.14.4
OS : Windows 10
```

I am using this **cordova-plugin-camera** to take photos and access the photo gallery in my app.

config.xml
` `

I am using the WkWebView Engine for iOS.

```





```
css
```
body {
padding: constant(safe-area-inset-top) constant(safe-area-inset-right) constant(safe-area-inset-bottom) constant(safe-area-inset-left); //iOS 11.2
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
```
html
` `

Since then I have been having issues with this plugin.
When I use this plugin, it seems to alter the "safe area" of my application.

Note the safe area and the button is pushed out of it.

![Simulator Screen Shot - iPhone Xr iOS 13 - 2020-08-21 at 14 06 15](https://user-images.githubusercontent.com/1875260/90909570-db950a00-e3cd-11ea-8f6c-114ef16f060f.png)

Contributor guide

Open the contributing guide

Research direction

Reproduce the safe-area change on an iPhone XR running iOS 13 with the listed Cordova, Ionic, WKWebView, and cordova-plugin-camera versions. Start with config.xml, the safe-area CSS, and the viewport meta tag, then compare the layout before and after using the camera or gallery; done means the button remains inside the safe area when the plugin is used.

Written by the indexing model from the issue text.

Assessment

Tech stack
angularjs, ios, javascript, objective-c
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.