feat(popover): add height auto for safari and remove ability to scroll on backdrop

references #5420
This commit is contained in:
Brandy Carney
2016-05-25 14:55:41 -04:00
parent 4db72cfc2c
commit 620b7c86b0
3 changed files with 10 additions and 3 deletions

View File

@ -39,6 +39,7 @@ ion-popover {
ion-page {
position: relative;
display: flex;
height: auto;
}
}

View File

@ -72,7 +72,7 @@ export class Popover extends ViewController {
@Component({
selector: 'ion-popover',
template:
'<div disable-activated class="backdrop" (click)="bdClick()" [class.hide-backdrop]="!d.showBackdrop"></div>' +
'<div class="backdrop" (touchmove)="bdTouch($event)" (click)="bdClick($event)" [class.hide-backdrop]="!d.showBackdrop" disable-activated tappable role="presentation"></div>' +
'<div class="popover-wrapper">' +
'<div class="popover-arrow"></div>' +
'<div class="popover-content">' +
@ -125,6 +125,11 @@ class PopoverCmp {
return this._viewCtrl.dismiss(null, role);
}
bdTouch(ev) {
ev.preventDefault();
ev.stopPropagation();
}
bdClick() {
if (this.isEnabled() && this.d.enableBackdropDismiss) {
this.dismiss('backdrop');
@ -269,7 +274,6 @@ class PopoverMdPopIn extends PopoverTransition {
super(opts);
let ele = enteringView.pageRef().nativeElement;
this.positionView(ele, opts.ev);
let wrapper = new Animation(ele.querySelector('.popover-wrapper'));
@ -317,7 +321,6 @@ class PopoverWpPopIn extends PopoverTransition {
super(opts);
let ele = enteringView.pageRef().nativeElement;
this.positionView(ele, opts.ev);
let wrapper = new Animation(ele.querySelector('.popover-wrapper'));

View File

@ -47,5 +47,8 @@
<button (click)="presentListPopover($event)">
<ion-icon name="more"></ion-icon>
</button>
<button (click)="presentLongListPopover($event)">
<ion-icon name="search"></ion-icon>
</button>
</ion-buttons>
</ion-toolbar>