mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
add height=device-height on Cordova iOS 7.0
This commit is contained in:
@@ -94,6 +94,10 @@ function viewportUpdate() {
|
||||
// iPhone <= 6.1 WebView
|
||||
// if height was set it needs to get removed with this hack for <= 6.1
|
||||
if( initHeight ) viewportProperties.height = '0';
|
||||
|
||||
} else if(version == 7) {
|
||||
//iPhone == 7.0 WebView
|
||||
viewportProperties.height = DEVICE_HEIGHT;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -322,10 +322,10 @@ describe('Ionic Viewport', function() {
|
||||
vportTag.content = 'user-scalable=no, width=device-width, height=device-height';
|
||||
viewportLoadTag();
|
||||
|
||||
expect( vportTag.content ).toEqual('user-scalable=no, width=device-width');
|
||||
expect( vportTag.content ).toEqual('user-scalable=no, width=device-width, height=device-height');
|
||||
});
|
||||
|
||||
it('Should add width, but not height to viewport for iOS 7.0, iPhone, WebView', function(){
|
||||
it('Should add width and height to viewport for iOS 7.0, iPhone, WebView', function(){
|
||||
ionic.Platform.setPlatform('iOS');
|
||||
ionic.Platform.setVersion('7.0');
|
||||
window.cordova = {};
|
||||
@@ -333,7 +333,7 @@ describe('Ionic Viewport', function() {
|
||||
vportTag.content = 'user-scalable=no';
|
||||
viewportLoadTag();
|
||||
|
||||
expect( vportTag.content ).toEqual('user-scalable=no, width=device-width');
|
||||
expect( vportTag.content ).toEqual('user-scalable=no, width=device-width, height=device-height');
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user