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

Resizing CordovaBrowser hide html content #3

Open
VanVan opened this issue Sep 16, 2015 · 3 comments
Open

Resizing CordovaBrowser hide html content #3

VanVan opened this issue Sep 16, 2015 · 3 comments

Comments

@VanVan
Copy link

VanVan commented Sep 16, 2015

When resizing Cordova browser with "this.CordovaView.CordovaBrowser.Height=xx" the height is successfully modified, but hide bottom html content instead of resizing content.
It seems to resize visible webview, but the display height is still the same.

For example, if we have tabs on bottom, this plugin hide tabs on bottom. You can have a try with this Microsoft Template:
https://visualstudiogallery.msdn.microsoft.com/b26474d5-c14d-4d69-bad5-37954538c506

With navbar or resized with this plugin
Capture 2

Without navbar or without resize with this plugin
Capture 1

@VanVan VanVan changed the title Resizing CordovaBrowser Resizing CordovaBrowser hide html content Sep 16, 2015
@taroquu
Copy link
Owner

taroquu commented Sep 16, 2015

Hi @VanVan
The CordovaNavbarPlugin does not resize the web view, and doesn't adjust your HTML content. It provides you with the height of the nav bar/soft keys when the app is launched and when the user toggles the soft keys by swiping up.

Within your event listener on navbarchange you will need to adjust your content accordingly, to compensate for the navbar overlaying your content.

@VanVan
Copy link
Author

VanVan commented Sep 16, 2015

Hi @taroquu
Thanks for your quick reply.
I already do that, but there is something bad.
If I reduce size of content, with the listener, there is no problem when navbar is hidden, and when the navbar appear, the content seems good. But if the user scroll the content, he can see extra display zone behind the navbar, so the result is not as good as it should be.
For example, if the user scroll and the navbar is 53px, when navbar is show, user can see 53px blank zone that was behind navbar when scrolled, and we need to keep scroll activated for ionic for example.
Do you have a solution to force adjust HTML content when we change cordova webview size ?

@taroquu
Copy link
Owner

taroquu commented Sep 16, 2015

I use App Framework, so I adjust the height of the wrapping div. That div has scrolling within it, so the user cannot scroll onto the gap behind the nav bar. I'm not hugely familiar with Ionic, but perhaps you are able to do something similar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants