Skip to content

Webview contentInset property doesn't work in Android. But, work well in iOS  #16111

Closed

Description

@rogerluo410

Is this a bug report?

(write your answer here) yes

Have you read the Contributing Guidelines?

(Write your answer here.) Yes

Environment

OS:  macOS Sierra 10.12.6
Node:  8.4.0
Yarn:  0.27.5
npm:  5.4.0
Watchman:  4.7.0
Xcode:  Xcode 8.3.3 Build version 8E3004b
Android Studio:  2.3 AI-162.4069837

react-native: 0.44.2
react: 16.0.0-alpha.12 

Steps to Reproduce

(Write your steps here:)

contentInset={{top: -8, left: -8}} contentInset property doesn't work in Android, but, this is not marked as an iOS property in Docs.

Expected Behavior

(Write what you thought would happen.)

How to fix it ? move or remove the content offset? No space between webview and content.

which RN version could solve the problem and use the contentInset property??

Thank you.

Actual Behavior

(Write what happened. Add screenshots!)

image

I am hoping in Android:

image

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Activity

  1. janicduplessis commented on Sep 29, 2017

    @janicduplessis
    Contributor

    Android doesn't have the concept of insets so I think this is more of a documentation issue, the prop should be marked as iOS only. Is it possible to achieve the effect you are looking for on Android using padding instead?

  2. added
    Good first issue
    Help Wanted :octocat:
    on Sep 29, 2017
  3. locked as resolved and limited conversation to collaborators on Dec 25, 2018
  4. added
    Resolution: Locked
    on Dec 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueHelp Wanted :octocat:Resolution: Locked

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions