Skip to content

bug: After keyboard open, the content height is wrong #5187

Description

@andre-huehn

Type: bug

Ionic Version: 1.x

Platform: android 5.1 webview

1.Create a screen without header and footer bars
2.Open the keyboard to enter something
=> The height of the content is calculated in the wrong fashion

Code wrong (Original Source code scrollViewNative.js):
scrollViewOffsetHeight = Math.max(0, Math.min(self.__originalContainerHeight, self.__originalContainerHeight - (e.detail.keyboardHeight - 43)));

Code right (Altered Source Code):
scrollViewOffsetHeight = Math.max(0, Math.min(self.__originalContainerHeight, self.__originalContainerHeight - (e.detail.keyboardHeight - ($scope.$hasHeader ? 43 : 0))));

This could of course also be solved in different ways, but this helped me solving the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions