iOS: Missing top margin in the the toolbar of a modal
Short description of the problem:
The toolbar on a modal on iOS needs more margin on top.
What behavior are you expecting?
Steps to reproduce:
- create and present a modal with an toolbar
- 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
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!
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.
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
@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 Are you viewing the app running directly on your device or in the Ionic View app?
the same in Ionic View app
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.
Yes the screenshots are from a iPhone 5 with ios 9.3
Are you using any custom components to wrap your toolbars? Could you paste the markup, please? Thanks!
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.