mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 05:58:26 +08:00
fix(toast): remove backdrop, allow user interaction when up
Closes #6291
This commit is contained in:
@ -18,6 +18,8 @@ ion-toast {
|
|||||||
|
|
||||||
width: $toast-width;
|
width: $toast-width;
|
||||||
height: $toast-width;
|
height: $toast-width;
|
||||||
|
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toast-container {
|
.toast-container {
|
||||||
@ -25,12 +27,14 @@ ion-toast {
|
|||||||
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
button {
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toast-button {
|
||||||
padding: 19px 16px 17px;
|
padding: 19px 16px 17px;
|
||||||
|
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.toast-message {
|
.toast-message {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
@ -122,7 +122,6 @@ export class Toast extends ViewController {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'ion-toast',
|
selector: 'ion-toast',
|
||||||
template: `
|
template: `
|
||||||
<div (click)="bdClick()" tappable disable-activated class="backdrop" role="presentation"></div>
|
|
||||||
<div class="toast-wrapper">
|
<div class="toast-wrapper">
|
||||||
<div class="toast-container">
|
<div class="toast-container">
|
||||||
<div class="toast-message" id="{{hdrId}}" *ngIf="d.message">{{d.message}}</div>
|
<div class="toast-message" id="{{hdrId}}" *ngIf="d.message">{{d.message}}</div>
|
||||||
@ -189,12 +188,6 @@ class ToastCmp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bdClick() {
|
|
||||||
if (this.isEnabled() && this.d.enableBackdropDismiss) {
|
|
||||||
this.dismiss('backdrop');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cbClick() {
|
cbClick() {
|
||||||
if (this.isEnabled()) {
|
if (this.isEnabled()) {
|
||||||
this.dismiss('close');
|
this.dismiss('close');
|
||||||
|
@ -192,7 +192,6 @@ export class Toggle implements ControlValueAccessor {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
private _setChecked(isChecked: boolean) {
|
private _setChecked(isChecked: boolean) {
|
||||||
console.debug('_setChecked')
|
|
||||||
if (isChecked !== this._checked) {
|
if (isChecked !== this._checked) {
|
||||||
this._checked = isChecked;
|
this._checked = isChecked;
|
||||||
if (this._init) {
|
if (this._init) {
|
||||||
|
Reference in New Issue
Block a user