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 {
|
ion-page {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ export class Popover extends ViewController {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'ion-popover',
|
selector: 'ion-popover',
|
||||||
template:
|
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-wrapper">' +
|
||||||
'<div class="popover-arrow"></div>' +
|
'<div class="popover-arrow"></div>' +
|
||||||
'<div class="popover-content">' +
|
'<div class="popover-content">' +
|
||||||
@ -125,6 +125,11 @@ class PopoverCmp {
|
|||||||
return this._viewCtrl.dismiss(null, role);
|
return this._viewCtrl.dismiss(null, role);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bdTouch(ev) {
|
||||||
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
|
}
|
||||||
|
|
||||||
bdClick() {
|
bdClick() {
|
||||||
if (this.isEnabled() && this.d.enableBackdropDismiss) {
|
if (this.isEnabled() && this.d.enableBackdropDismiss) {
|
||||||
this.dismiss('backdrop');
|
this.dismiss('backdrop');
|
||||||
@ -269,7 +274,6 @@ class PopoverMdPopIn extends PopoverTransition {
|
|||||||
super(opts);
|
super(opts);
|
||||||
|
|
||||||
let ele = enteringView.pageRef().nativeElement;
|
let ele = enteringView.pageRef().nativeElement;
|
||||||
this.positionView(ele, opts.ev);
|
|
||||||
|
|
||||||
let wrapper = new Animation(ele.querySelector('.popover-wrapper'));
|
let wrapper = new Animation(ele.querySelector('.popover-wrapper'));
|
||||||
|
|
||||||
@ -317,7 +321,6 @@ class PopoverWpPopIn extends PopoverTransition {
|
|||||||
super(opts);
|
super(opts);
|
||||||
|
|
||||||
let ele = enteringView.pageRef().nativeElement;
|
let ele = enteringView.pageRef().nativeElement;
|
||||||
this.positionView(ele, opts.ev);
|
|
||||||
|
|
||||||
let wrapper = new Animation(ele.querySelector('.popover-wrapper'));
|
let wrapper = new Animation(ele.querySelector('.popover-wrapper'));
|
||||||
|
|
||||||
|
@ -47,5 +47,8 @@
|
|||||||
<button (click)="presentListPopover($event)">
|
<button (click)="presentListPopover($event)">
|
||||||
<ion-icon name="more"></ion-icon>
|
<ion-icon name="more"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
|
<button (click)="presentLongListPopover($event)">
|
||||||
|
<ion-icon name="search"></ion-icon>
|
||||||
|
</button>
|
||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
Reference in New Issue
Block a user