Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-5641

Displaying keyboard pushes view up

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.2.0
    • None
    • cordova-ios
    • iOS

    Description

      Tested environment: iOS 6.0, NO keyboard plugin.

      When focusing on an input/textarea field that result in keyboard is displayed then the view is pushed about 40px up.

      It was happened in version 3.0.0 and could work-around by below code, then it seemed to be fixed in 3.1.0 since I removed below code in the test app. But now it happens again in 3.2.0, I guess that it caused by changes relate to keyboard plugin, so now, add back below code snippet will work-around again in 3.2.0

      // Prevent screen from pushing up when keyboard appears.
      // http://stackoverflow.com/questions/13820088/how-to-prevent-keyboard-push-up-webview-at-ios-app-using-phonegap
      $(document).on("focus", "input", function (e) {
      			e.preventDefault();
      			e.stopPropagation();
      			window.scrollTo(0, 0);
      		});
      
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tiendq Tien Do
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: