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

onLoadResource Causing Loading Issues #38

Closed
jacobacon opened this issue Jan 14, 2019 · 4 comments
Closed

onLoadResource Causing Loading Issues #38

jacobacon opened this issue Jan 14, 2019 · 4 comments

Comments

@jacobacon
Copy link

I noticed that when the "useOnLoadResource" option is enabled on Android, the page fails to load completely in the InAppBrowser

I initially thought it was an issue with my onLoadResource function, but noticed this behavior is consistent with a clean project and the built-in "dummy" onLoadResource function.

floatingActionButton: FloatingActionButton( onPressed: () { inAppBrowser.open( url: "https://www.google.com", options: {"useOnLoadResource": false}); }, tooltip: 'Increment', child: Icon(Icons.add), ),

As you can see google.com is render with normal CSS as expected.

image

`

Now the only thing I changed was enabling onLoadResource, without even @Overriding the built in method.

floatingActionButton: FloatingActionButton(
onPressed: () {
inAppBrowser.open(
url: "https://www.google.com",
options: {"useOnLoadResource": true});
},
tooltip: 'Increment',
child: Icon(Icons.add),
),
`
Here you can see google.com doesn't render properly, with the wrong scaling and missing style on the top buttons.

image

I've tried downgrading my version, and the issue still exists, and is not present at all on iOS.

@pichillilorenzo
Copy link
Owner

Ok, I will check about that! Thanks

@alsocalledchris
Copy link

@pichillilorenzo I'm having this issue on Android as well - it has different behaviour with the option enabled and disabled even if you have no actions - doesn't seem to affect every page shown - just some?

@pichillilorenzo
Copy link
Owner

pichillilorenzo commented Mar 11, 2019

@alsocalledchris the problem is here: https://github.com/pichillilorenzo/flutter_inappbrowser/blob/a1e3011087119570e16b8caa9176aacabe46924e/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/InAppWebView/InAppWebViewClient.java#L363
I don't know why it works in some pages and in some not.

However, now the function returns null so should be fixed with the new version 0.6.0, but I don't like this fix very much.

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants