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

Statusbar plugin unnecessary webview and brakes keyboard behaviour.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Seems I found conflict between keyboard plugin and statusbar plugin on iOS
      Immediately after initialization our application shows two text fields with focus on one of them and keyboard appears and should shrink webview.
      But statusbar plugin brakes this behaviour and I think that root cause is unnecessary resizing webview after init. Function resizeWebView of CDVStatusBar is responsible for resizing.
      Let me show what I get on tracing and debugging:
      1. First of all cordovaViewWillAppear will be executed. It resizes webview with default value of statusBarOverlaysWebView. Default value is "YES".
      2. Keyboard plugin shrink webview to show keyboard. Looks like it calculates new height of webview considering statusbar height: https://github.com/cjpearson/cordova-plugin-keyboard/blob/master/src/ios/CDVKeyboard.m#L186
      3. Statusbar plugin reads value of "StatusBarOverlaysWebView" setting from plugin config and resize webview again and it doesn't care about height of keyboard, and webview is not shrinked according keyboard setting. https://github.com/apache/cordova-plugin-statusbar/blob/master/src/ios/CDVStatusBar.m#L181

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              agolovinsky Artem Golovinsky
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: