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

Android status bar appears when keyboard pops up.

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.1.0
    • None

    Description

      When configuring for full screen app, the statusbar will appear when the keyboard pops up for input. The iOS build is fine. The previous version cordova-plugin-statusbar 2.0.0 does not exhibit this problem.

          <preference name="StatusBarOverlaysWebView" value="true" />
          <preference name="DisallowOverscroll" value="true" />
          <preference name="Fullscreen" value="true" />
      

      Also mentioned in this post.

      Attachments

        1. StatusBarShowsAfterKeyboardShowAndHide.png
          34 kB
          David Hooey
        2. NoStatusBar.png
          28 kB
          David Hooey

        Issue Links

          Activity

            jcesarmobile jcesarmobile added a comment -

            closing as there is another issue with a PR

            jcesarmobile jcesarmobile added a comment - closing as there is another issue with a PR
            breautek Norman Breau added a comment - - edited

            CB-13300 is a duplicate of this ticket but I do have PR fix against CB-13300 addressing this issue.

            breautek Norman Breau added a comment - - edited CB-13300 is a duplicate of this ticket but I do have PR fix against CB-13300 addressing this issue.

            davidhooey, there are some things which you should fix in your project to get rid of this issue:
            1. update plugin spec from '~2.1.3' to '^2.2.2', otherwise you can't get this fix
            2. fix bug in your JS code (https://github.com/davidhooey/cb-11197/blob/master/www/js/index.js#L36), there isn't element with 'deviceready' id in your html code

            kaynzw, could you please provide some information about your case (cordova plugin list && cordova platform list), also it'd very helpful if you could attach sample project where this bug reproduces.

            Nikita Matrosov Nikita Matrosov added a comment - davidhooey , there are some things which you should fix in your project to get rid of this issue: 1. update plugin spec from '~2.1.3' to '^2.2.2', otherwise you can't get this fix 2. fix bug in your JS code ( https://github.com/davidhooey/cb-11197/blob/master/www/js/index.js#L36 ), there isn't element with 'deviceready' id in your html code kaynzw , could you please provide some information about your case ( cordova plugin list && cordova platform list ), also it'd very helpful if you could attach sample project where this bug reproduces.
            kaynzw Volkan G. added a comment -

            Still not resolved

            kaynzw Volkan G. added a comment - Still not resolved
            davidhooey David Hooey added a comment - Looks like this could be an issue with standard Android as well. http://stackoverflow.com/questions/30999110/edittext-shows-the-status-bar-or-causes-content-above-to-move-instead-of-resize
            davidhooey David Hooey added a comment -

            Still not resolved on my end. Not sure if my test is correct?

            davidhooey David Hooey added a comment - Still not resolved on my end. Not sure if my test is correct?
            davidhooey David Hooey added a comment -

            I manually (I'm not sure how to pull changes directly into the installed statusbar plugin) applied the changes from the latest master branch and nothing has changed. The issue still persists.

            Here's what I did in case I did something wrong.

            1. Uninstalled the CB11197 app from the device.

            adb uninstall ca.davidhooey.cb11197
            

            2. Cloned the cordova-plugin-statusbar repo locally and ensured the master branch was checked out.

            3. Replaced the ./CB11197/plugins/cordova-plugin-statusbar files with the files from the checked out master branch.

            4. Reinstalled the android platform.

            cordova platform rm android
            cordova platform add android
            

            5. Verified the latest changes to StatusBar.java were present in the android platform located at CB11197/platforms/android/src/org/apache/cordova/statusbar/StatusBar.java.

            6. Run the app where the statusbar still appears when the text field is selected that the keyboard pops up.

            cordova run android
            
            davidhooey David Hooey added a comment - I manually (I'm not sure how to pull changes directly into the installed statusbar plugin) applied the changes from the latest master branch and nothing has changed. The issue still persists. Here's what I did in case I did something wrong. 1. Uninstalled the CB11197 app from the device. adb uninstall ca.davidhooey.cb11197 2. Cloned the cordova-plugin-statusbar repo locally and ensured the master branch was checked out. 3. Replaced the ./CB11197/plugins/cordova-plugin-statusbar files with the files from the checked out master branch. 4. Reinstalled the android platform. cordova platform rm android cordova platform add android 5. Verified the latest changes to StatusBar.java were present in the android platform located at CB11197/platforms/android/src/org/apache/cordova/statusbar/StatusBar.java. 6. Run the app where the statusbar still appears when the text field is selected that the keyboard pops up. cordova run android
            githubbot ASF GitHub Bot added a comment -

            Github user asfgit closed the pull request at:

            https://github.com/apache/cordova-plugin-statusbar/pull/59

            githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-plugin-statusbar/pull/59

            Commit cfce72991210086ef27c74e31570231639cf75e2 in cordova-plugin-statusbar's branch refs/heads/master from vladimir.kotikov
            [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-statusbar.git;h=cfce729 ]

            CB-11197 Keep status bar hidden when keyboard pops up

            This closes #59

            jira-bot ASF subversion and git services added a comment - Commit cfce72991210086ef27c74e31570231639cf75e2 in cordova-plugin-statusbar's branch refs/heads/master from vladimir.kotikov [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-statusbar.git;h=cfce729 ] CB-11197 Keep status bar hidden when keyboard pops up This closes #59
            githubbot ASF GitHub Bot added a comment -

            Github user nikhilkh commented on the pull request:

            https://github.com/apache/cordova-plugin-statusbar/pull/59#issuecomment-221027111

            LGTM

            githubbot ASF GitHub Bot added a comment - Github user nikhilkh commented on the pull request: https://github.com/apache/cordova-plugin-statusbar/pull/59#issuecomment-221027111 LGTM

            Yes, i was able to reproduce it. The fix for the issue is here: https://github.com/apache/cordova-plugin-statusbar/pull/59. davidhooey, could you please verify that it works for you?

            vladimir.kotikov Vladimir Kotikov added a comment - Yes, i was able to reproduce it. The fix for the issue is here: https://github.com/apache/cordova-plugin-statusbar/pull/59 . davidhooey , could you please verify that it works for you?
            githubbot ASF GitHub Bot added a comment -

            Github user cordova-qa commented on the pull request:

            https://github.com/apache/cordova-plugin-statusbar/pull/59#issuecomment-220959317

            Cordova CI Build has completed successfully.

            *Commit* - [Link](https://github.com/apache/cordova-plugin-statusbar/pull/59/commits/e9cbc1e579cc8f4c1d446ff9f0c08b250a17154c)
            *Dashboard* - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11/)

            Builder Name Console Output Test Report Device Logs
            :---: :---: :---: :---:
            [Windows 8.1 Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-store/) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-store/console) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-store/testReport/) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-store/artifact/)
            [Windows 10 Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-10-store/) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-10-store/console) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-10-store/testReport/) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-10-store/artifact/)
            [Windows 8.1 Phone]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-phone/) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-phone/console) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-phone/testReport/) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-phone/artifact/)
            [iOS]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=ios/) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=ios/console) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=ios/testReport/) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=ios/artifact/)
            [Android Mac]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=android/) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=android/console) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=android/testReport/) [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=android/artifact/)
            githubbot ASF GitHub Bot added a comment - Github user cordova-qa commented on the pull request: https://github.com/apache/cordova-plugin-statusbar/pull/59#issuecomment-220959317 Cordova CI Build has completed successfully. * Commit * - [Link] ( https://github.com/apache/cordova-plugin-statusbar/pull/59/commits/e9cbc1e579cc8f4c1d446ff9f0c08b250a17154c ) * Dashboard * - [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11/ ) Builder Name Console Output Test Report Device Logs :---: :---: :---: :---: [Windows 8.1 Store] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-store/ ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-store/console ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-store/testReport/ ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-store/artifact/ ) [Windows 10 Store] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-10-store/ ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-10-store/console ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-10-store/testReport/ ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-10-store/artifact/ ) [Windows 8.1 Phone] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-phone/ ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-phone/console ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-phone/testReport/ ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=windows-slave,platformName=windows-8.1-phone/artifact/ ) [iOS] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=ios/ ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=ios/console ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=ios/testReport/ ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=ios/artifact/ ) [Android Mac] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=android/ ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=android/console ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=android/testReport/ ) [Link] ( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/11//label=mac-slave,platformName=android/artifact/ )
            githubbot ASF GitHub Bot added a comment -

            GitHub user vladimir-kotikov opened a pull request:

            https://github.com/apache/cordova-plugin-statusbar/pull/59

            CB-11197 Keep status bar hidden when keyboard pops up

            This PR fixes incorrect behavior of status bar when it shows up when keyboard pops up even if it was hidden previously

            See CB-11197(https://issues.apache.org/jira/browse/CB-11197) for details

            You can merge this pull request into a Git repository by running:

            $ git pull https://github.com/MSOpenTech/cordova-plugin-statusbar CB-11197

            Alternatively you can review and apply these changes as the patch at:

            https://github.com/apache/cordova-plugin-statusbar/pull/59.patch

            To close this pull request, make a commit to your master/trunk branch
            with (at least) the following in the commit message:

            This closes #59


            commit e9cbc1e579cc8f4c1d446ff9f0c08b250a17154c
            Author: Vladimir Kotikov <kotikov.vladimir@gmail.com>
            Date: 2016-05-23T11:42:22Z

            CB-11197 Keep status bar hidden when keyboard pops up


            githubbot ASF GitHub Bot added a comment - GitHub user vladimir-kotikov opened a pull request: https://github.com/apache/cordova-plugin-statusbar/pull/59 CB-11197 Keep status bar hidden when keyboard pops up This PR fixes incorrect behavior of status bar when it shows up when keyboard pops up even if it was hidden previously See CB-11197 ( https://issues.apache.org/jira/browse/CB-11197 ) for details You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-plugin-statusbar CB-11197 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-statusbar/pull/59.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #59 commit e9cbc1e579cc8f4c1d446ff9f0c08b250a17154c Author: Vladimir Kotikov <kotikov.vladimir@gmail.com> Date: 2016-05-23T11:42:22Z CB-11197 Keep status bar hidden when keyboard pops up
            taylor@developerhut.co.za Taylor Gibb added a comment -

            I can reproduce this. Its very annoying.

            taylor@developerhut.co.za Taylor Gibb added a comment - I can reproduce this. Its very annoying.
            davidhooey David Hooey added a comment -

            vladimir.kotikov are you able to reproduce the issue with the test app?

            davidhooey David Hooey added a comment - vladimir.kotikov are you able to reproduce the issue with the test app?
            davidhooey David Hooey added a comment -

            Added a couple of screen shots from the Samsung Galaxy Tab S2 device running Android 5.1.1.

            davidhooey David Hooey added a comment - Added a couple of screen shots from the Samsung Galaxy Tab S2 device running Android 5.1.1.
            davidhooey David Hooey added a comment -

            I have reproduce the issue within a new app. I have added it to GitHub. https://github.com/davidhooey/cb-11197.

            davidhooey David Hooey added a comment - I have reproduce the issue within a new app. I have added it to GitHub. https://github.com/davidhooey/cb-11197 .
            davidhooey David Hooey added a comment -

            Thanks! I will create a sample project based on my existing. Installed cordova-android is 5.1.1. Device is Samsung Galaxy Tab S2 with Android 5.1.1.

            davidhooey David Hooey added a comment - Thanks! I will create a sample project based on my existing. Installed cordova-android is 5.1.1. Device is Samsung Galaxy Tab S2 with Android 5.1.1.
            vladimir.kotikov Vladimir Kotikov added a comment - - edited

            I can't reproduce the issue - This is odd, but in my case the status bar behaves the same way despite of the plugin version installed:

            1. On Android 6.0.1 device it works exactly as you described - it appears along with the keyboard when i tap on the input field and doesn't disappear after keyboard is hidden.
            2. On Android 4.3 status bar behaves as expected and doesn't show up when the keyboard pops up.

            All this looks like the different issue, related to the way how cordova-android handles Fullscreen preference and not to the StatusBar plugin directly (the CB-9696 is very similar)

            davidhooey, could you please attach the sample project where the problem reproduces? Also it'd be great if you could specify a version of cordova-android platform you're using and Android version on your device/emulator.

            vladimir.kotikov Vladimir Kotikov added a comment - - edited I can't reproduce the issue - This is odd, but in my case the status bar behaves the same way despite of the plugin version installed : 1. On Android 6.0.1 device it works exactly as you described - it appears along with the keyboard when i tap on the input field and doesn't disappear after keyboard is hidden. 2. On Android 4.3 status bar behaves as expected and doesn't show up when the keyboard pops up. All this looks like the different issue, related to the way how cordova-android handles Fullscreen preference and not to the StatusBar plugin directly (the CB-9696 is very similar) davidhooey , could you please attach the sample project where the problem reproduces? Also it'd be great if you could specify a version of cordova-android platform you're using and Android version on your device/emulator.
            nikhilkh Nikhil Khandelwal added a comment - vladimir.kotikov Did this change cause a regression here? https://github.com/apache/cordova-plugin-statusbar/commit/a4a1065c4f47243f835f195c8359f33c2379922a

            People

              Unassigned Unassigned
              davidhooey David Hooey
              Votes:
              7 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: