ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

iOS: Missing top margin in the the toolbar of a modal

Open DavidWiesner opened this issue 10 years ago • 9 comments

Short description of the problem:

The toolbar on a modal on iOS needs more margin on top.

img_0085

What behavior are you expecting?

Steps to reproduce:

  1. create and present a modal with an toolbar
  2. run app on iOS device
insert any relevant code between the above and below backticks

Version

Your system information:

Cordova CLI: 6.2.0 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.10 Ionic CLI Version: 2.0.0-beta.30 Ionic App Lib Version: 2.0.0-beta.16 OS: Distributor ID: Debian Description: Debian GNU/Linux 8.5 (jessie) Node Version: v5.12.0

Plunker that shows an example of your issue

http://plnkr.co/edit/H5n56yZlXX4e7KjwZnJV?p=preview

DavidWiesner avatar Jun 28 '16 12:06 DavidWiesner

Is your toolbar in an ion-header? Like this:

<ion-header>
  <ion-toolbar>
    <ion-title>This is a modal</ion-title>
  </ion-toolbar>
</ion-header>

Please see the steps to upgrade to beta 10 and let me know if this issue persists: https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#steps-to-upgrade-to-beta-10

Thanks!

brandyscarney avatar Jun 28 '16 16:06 brandyscarney

yes in beta 10 I already add ion-header. But this issue was also in beta 9. In beta 10 this was getting worst now also ion-toolbars (now surrounded with ion-header) has no padding to top. But the menu in the sidebar will. img_0094 img_0093 In the browser all worked like expected there is padding on top of the toolbars and the modal if I turn on the config statusbarPadding:true (http://plnkr.co/edit/4x18dod8NrTwXA5QUTQp?p=preview). But on the compiled app the toolbar in the page and in the modal has no padding

DavidWiesner avatar Jun 29 '16 10:06 DavidWiesner

@brandyscarney I think the bug in beta 9 was fixed with the commit https://github.com/driftyco/ionic/commit/181129b7b4325c550ef16139f6a5f61f30878d3e#diff-f1546b317b865985df56bba719ec4704 . In beta 10 it's still an issue on the device

DavidWiesner avatar Jun 29 '16 10:06 DavidWiesner

@DavidWiesner Are you viewing the app running directly on your device or in the Ionic View app?

brandyscarney avatar Jun 29 '16 14:06 brandyscarney

the same in Ionic View app

EugeneNews avatar Jun 29 '16 17:06 EugeneNews

So that is a bug with the Ionic View app, there is an open issue to fix this here: https://github.com/driftyco/ionic-view-issues/issues/164

It also has a workaround added but it will add padding in the browser, too.

brandyscarney avatar Jun 29 '16 18:06 brandyscarney

Yes the screenshots are from a iPhone 5 with ios 9.3

DavidWiesner avatar Jun 30 '16 03:06 DavidWiesner

Are you using any custom components to wrap your toolbars? Could you paste the markup, please? Thanks!

brandyscarney avatar Jun 30 '16 03:06 brandyscarney

I'm sorry this was my mistake. I used ionic generate component to start with the modal. This also add an custom selector

@Component({
    selector: 'help-modal',
    templateUrl: 'build/components/help-modal/help-modal.html'
})

removing this selector solve the problem to me.

DavidWiesner avatar Jul 08 '16 08:07 DavidWiesner