-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
[BUG] content area scroll does not work correctly after data is changed in another screen #104
Comments
@ebhsgit Thank you for issue! What i have seen from your example, you are using |
@roman-rr Thanks for getting back to me. You are correct. On my root page, the pane is always presented, and only loaded on load. I've reproduced the issue. Please use the source code from below Video of the issue Steps to reproduce.
Note I think the problem is caused by the keyboard hide event, and the presented pane being in the background page. My app has another page in between the root and the data edit page. So when the user change data in the edit page, and use the back button, it still causes the issue. |
Added an intermediate page to cause the bug even without user manually closing the keyboard. Steps
|
@ebhsgit When you route to some page, previous page got Your solution must be additional re-calculating overflow height with method on ionViewWillEnter() {
if (this.btmPane) {
this.btmPane.setOverflowHeight();
}
} Other way is to set offsetTop to static in package on first load. But dynamic cases must have for some users, and i prefer to await if more similar cases occurs. |
Thank @roman-rr I got caught up with other stuff and didn't get to test master branch earlier. I can confirm adding
Fixes the issue, even on the previous version (without using the changes from the latest master) |
Alternative implementation Just check If not visible don't |
@roman-rr I've updated my test project with reference to latest master Likely caused by "Fix on pull" commit. |
@ebhsgit Should be fixed |
Describe the bug
My app is built on Ionic 3.
On the root page is a cupertino-pane.
The cupertino pane has a header and content area. The content shows a list bound to an array of items.
The user can
push
another view to edit any of the items.When the user changes the a value of any of the items in the list, and
pop
back to the root page. The content area can not scroll to the bottom of the list.To Reproduce
You will need a project that has the setup as described above
Example project
https://stackblitz.com/edit/ionic-boe2na
NOTE: Problem is not reproduced in the sample project, because the dependency is using older library - 1.1.652
Unable to use latest code in stackblitz.com
Expected behavior
The content area scrolls correctly
Smartphone (please complete the following information):
Additional context
The problem is due to
setOverflowHeight()
calculating incorrect value, due tothis.overflowEl.offsetTop
being 0.Using my page as an example.
The height of the pane is 300px.
On first showing the pane, the heights are calculated correctly.
When
setOverflowHeight()
calculates this first height, thethis.overflowEl.offsetTop
is 85.When an item is being edited in another page.
setOverflowHeight()
is called, but the calculated height is set to 300px.The problem is because
this.overflowEl.offsetTop
is 0.The text was updated successfully, but these errors were encountered: