question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ Expo web ] - wrong element width in web, same code fine on Android

See original GitHub issue

🐛 Bug Report

Environment

Environment info:
System:
  OS: macOS 10.15.3
  Shell: 5.7.1 - /bin/zsh
Binaries:
  Node: 13.11.0 - ~/.nvm/versions/node/v13.11.0/bin/node
  npm: 6.13.7 - ~/.nvm/versions/node/v13.11.0/bin/npm
  Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
  Android Studio: 3.4 AI-183.5429.30.34.5452501
  Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
  expo: ~36.0.2 => 36.0.2
  react: ^16.13.1 => 16.13.1
  react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4
npmGlobalPackages:
  expo-cli: 3.15.5

Steps to Reproduce

Open this snack, notice that the header bar width is wrong on web, but fine on android.

Expected Behavior

Header bar at full width on both android and web.

Actual Behavior

Android works fine, web shows a wrapping div that makes the header smaller than it should be.

Reproducible Demo

import React from 'react';
import { Text, View, } from 'react-native'
import { Appbar } from 'react-native-paper'

export default class App extends React.Component {
  render() {
    return (
      <View style={ { flex: 1, flexDirection: 'column', alignItems: 'flex-start' } }>
        <Appbar.Header style={ { width: '100%', paddingVertical: 30 } }>
	          <Appbar.Content title={ 'title' } subtitle={ 'subtitle' }/>
        </Appbar.Header>
        <Text>Hello</Text>
      </View>
    );
  }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cruzachcommented, Mar 25, 2020

This issue seems like it might be better suited for either the react-native-paper repo, or react-native-web repo

0reactions
stale[bot]commented, Aug 1, 2020

This issue has been automatically closed since there has not been any recent activity after it was marked as stale. Please open a new issue for any related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Webview - Webpage should fit the device screen
I have same problem when I use this code ... I had video in html string, and width of web view was larger...
Read more >
Slow rendering - Android Developers
If these are taking a long time, first check the width and height numbers in the trace. Ensure that the bitmap being displayed...
Read more >
Handling common HTML and CSS problems - MDN Web Docs
Note: One common problem with CSS and HTML arises when different CSS rules begin to conflict with one another. This can be especially ......
Read more >
Overflow Issues In CSS - Smashing Magazine
It could occur because of unexpectedly wide content or a fixed-width element that is wider than the viewport. We will explore all of...
Read more >
Select Current Place and Show Details on a Map
Follow this tutorial to build an Android app using the Maps SDK for Android, the Places SDK for Android, and the fused location...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found