mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +08:00
feat(popover): add height auto for safari and remove ability to scroll on backdrop
references #5420
This commit is contained in:
@ -39,6 +39,7 @@ ion-popover {
|
||||
ion-page {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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'));
|
||||
|
||||
|
@ -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>
|
||||
|
Reference in New Issue
Block a user