Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebView can't get correct mobile detection from Drupal website #15180

Closed
kodatech opened this issue Jul 24, 2017 · 2 comments
Closed

WebView can't get correct mobile detection from Drupal website #15180

kodatech opened this issue Jul 24, 2017 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@kodatech
Copy link

  1. react-native-cli: 2.0.1
    react-native: 0.45.1
  2. node -v: v8.1.2
  3. npm -v:5.0.3

Target Platform: Android (using a Vodafone with Android 6.0 connected via USB)

Development Operating System: macOS Sierra

Steps to Reproduce

  1. Reaching site page with this code: render () { return ( <View style={styles.container}> <View style={styles.topbar}> <TouchableOpacity disabled={!this.state.canGoBack} onPress={this.onBack.bind(this)} > <Text style={this.state.canGoBack ? styles.topbarText : styles.topbarTextDisabled}>Go Back</Text> </TouchableOpacity> </View> <WebView ref={WEBVIEW_REF} style={{flex: 1}} source={{uri: ADDRESS}} // source={{uri: 'http://www.anzor.co.nz/'}} renderLoading={this.renderLoading} // onShouldStartLoadWithRequest={this.openExternalLink} onNavigationStateChange={this.onNavigationStateChange.bind(this)} startInLoadingState // userAgent='Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3' // javaScriptEnabled /> <View style={styles.bottombar}> <TouchableOpacity // disabled={!this.state.canGoBack} onPress={this.onReturn.bind(this)} > <View style={{flexDirection: 'row'}}> <Icon style={{fontSize: 30, paddingRight: 30, color: '#FFFFFF'}} name='md-barcode' /> <Text style={{color: '#FFFFFF', textAlignVertical: 'center', fontSize: 20}}>Return to Scanner</Text> </View> </TouchableOpacity> </View> </View> ) } }

  2. This scene was called from a different scene: return ( <Root> <Provider store={createStore(reducers, {conn}, applyMiddleware(ReduxThunk))}> <Router> <Scene key='welcomeScene' animation='fade' component={WelcomeScene} title='Welcome Scene' hideNavBar /> <Scene key='loginScene' animation='fade' component={LoginScene} title='Login Scene' hideNavBar /> <Scene key='listScene' animation='fade' type={ActionConst.REPLACE} component={ListScene} title='List Scene' hideNavBar /> <Scene key='scanScene' animation='fade' component={ScanScene} title='Scan Scene' hideNavBar /> <Scene key='homeScene' animation='fade' component={HomeScene} title='Home Scene' hideNavBar /> <Scene key='cartScene' animation='fade' component={CartScene} title='Cart Scene' hideNavBar /> </Router> </Provider> </Root> )

  3. I can reach the website page but I can't see it with mobile configuration.

  4. If I open the page from the same mobile device directly with chrome detection works as I want

  5. I have created a clean react native project from the scratch and just added a webview pointing to the page and works as it is expected, the same as point 4.

  6. I have enabled javaScriptEnabled, even it is true as default. No results

  7. I have added userAgent with same result as 7.

  8. I'm using react-native-router-flux and redux

Expected Behavior

Open page with webview and get configuraiton for mobile devices

Thanks in advance for your help!

@hramos
Copy link
Contributor

hramos commented Jul 25, 2017

Can you fix the formatting in your code examples? You can use three backticks (`) to format your code. Thanks!

@pull-bot
Copy link

pull-bot commented Oct 9, 2017

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

@hramos hramos added the Icebox label Oct 9, 2017
@hramos hramos closed this as completed Oct 9, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Oct 9, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants