cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Capulong (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-12478) iOS WebView's height becomes greater than screen height after dismissing the presented ViewController
Date Tue, 21 Feb 2017 16:52:44 GMT
Michael Capulong created CB-12478:
-------------------------------------

             Summary: iOS WebView's height becomes greater than screen height after dismissing
the presented ViewController
                 Key: CB-12478
                 URL: https://issues.apache.org/jira/browse/CB-12478
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugin Battery Status, Plugin Camera
         Environment: iOS
            Reporter: Michael Capulong


The combination of PRs for CB-10158 and CB-11191 has created this scenario.

Versions involved:
# cordova-plugin-statusbar - 2.2.1
# cordova-plugin-camera - 2.3.1 and below 

When the camera plugin view controller is dismissed in line 548
* https://github.com/apache/cordova-plugin-camera/blob/rel/2.3.1/src/ios/CDVCamera.m#L548,

the cordovaViewWillAppear method is called. This happens because cordovaViewWillAppear was
registered to listen for "CDVViewWillAppearNotification" events
* https://github.com/apache/cordova-plugin-statusbar/blob/rel/2.2.1/src/ios/CDVStatusBar.m#L120.

The method cordovaViewWillAppear calls resizeWebView. When resizeWebView reaches line 473
* https://github.com/apache/cordova-plugin-statusbar/blob/rel/2.2.1/src/ios/CDVStatusBar.m#L473,

all of statusBarFrame's members are set to zeroes. The app then proceeds with lines 476 and
480
* https://github.com/apache/cordova-plugin-statusbar/blob/rel/2.2.1/src/ios/CDVStatusBar.m#L476
* https://github.com/apache/cordova-plugin-statusbar/blob/rel/2.2.1/src/ios/CDVStatusBar.m#L480
and this results in frame.origin.y being assigned the value of 20.

Then in line 485, the frame.size.height gets the value of -20
* https://github.com/apache/cordova-plugin-statusbar/blob/rel/2.2.1/src/ios/CDVStatusBar.m#L485.

The negative height of the frame causes the the WebView to increase its height beyond the
screen by 20 units.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message