apache / apache/cordova-android

Android 11 css safe-area-insets not applied

Open
#1,465 29 comments 3 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
3.8k
Forks
1.6k
Avg merge
16h 18m
Merged PRs (30d)
11

Description

# Bug Report

## Problem

1. I created a clean cordova project (``cordova create hello com.example.hello HelloWorld``)
2. Added cordova platform android 10.0.2
3. Build the app on a device with a camera notch

=> The safe-area is considered.

4. Run ``cordova platform remove android``
5. Run ``cordova platform add android@11.0.0``
6. Run ``cordova run android``

=> The safe-area is not considered anymore

Only change I made in the ``config.xml``:

```

```

### What is expected to happen?

Using css padding safe-area-insets should add a safe-area padding

### What does actually happen?

The padding for the safe-area is not added when using ``android@11.0.0``

## Information

### Command or Code

### Environment, Platform, Device

- Huawei P30 Lite, Android
- Google Pixel 6

### Version information

cordova: 11.0.0
npm 8.11.0

## 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

Open the contributing guide

Research direction

Reproduce the issue with the listed cordova platform android 10.0.2 and android@11.0.0 commands on a notched Android device, using the Fullscreen preference in config.xml and CSS safe-area-insets. Compare the resulting padding between versions; done means the safe-area padding is applied with android@11.0.0 as it is with 10.0.2.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, css
Domain
frontend, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.