mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 13:32:54 +08:00
Merge pull request #10119 from manucorporat/fix-regressions
This commit is contained in:
@ -259,7 +259,9 @@ export class AlertCmp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (shouldDismiss) {
|
if (shouldDismiss) {
|
||||||
this.dismiss(button.role);
|
this.dismiss(button.role).catch(() => {
|
||||||
|
console.debug('alert can not be dismissed');
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,12 +315,7 @@ export class ItemSliding {
|
|||||||
openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;
|
openAmount = optsWidth + (openAmount - optsWidth) * ELASTIC_FACTOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.debouncer.write(() => {
|
this._setOpenAmount(openAmount, false);
|
||||||
|
|
||||||
// });
|
|
||||||
this._dom.write(() => {
|
|
||||||
this._setOpenAmount(openAmount, false);
|
|
||||||
});
|
|
||||||
|
|
||||||
return openAmount;
|
return openAmount;
|
||||||
}
|
}
|
||||||
@ -362,29 +357,30 @@ export class ItemSliding {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
private calculateOptsWidth() {
|
private calculateOptsWidth() {
|
||||||
this._plt.raf(() => {
|
if (!this._optsDirty) {
|
||||||
if (!this._optsDirty) {
|
return;
|
||||||
return;
|
}
|
||||||
}
|
this._optsWidthRightSide = 0;
|
||||||
this._optsWidthRightSide = 0;
|
if (this._rightOptions) {
|
||||||
if (this._rightOptions) {
|
this._optsWidthRightSide = this._rightOptions.width();
|
||||||
this._optsWidthRightSide = this._rightOptions.width();
|
assert(this._optsWidthRightSide > 0, '_optsWidthRightSide should not be zero');
|
||||||
assert(this._optsWidthRightSide > 0, '_optsWidthRightSide should not be zero');
|
}
|
||||||
}
|
|
||||||
|
|
||||||
this._optsWidthLeftSide = 0;
|
this._optsWidthLeftSide = 0;
|
||||||
if (this._leftOptions) {
|
if (this._leftOptions) {
|
||||||
this._optsWidthLeftSide = this._leftOptions.width();
|
this._optsWidthLeftSide = this._leftOptions.width();
|
||||||
assert(this._optsWidthLeftSide > 0, '_optsWidthLeftSide should not be zero');
|
assert(this._optsWidthLeftSide > 0, '_optsWidthLeftSide should not be zero');
|
||||||
}
|
}
|
||||||
this._optsDirty = false;
|
this._optsDirty = false;
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private _setOpenAmount(openAmount: number, isFinal: boolean) {
|
private _setOpenAmount(openAmount: number, isFinal: boolean) {
|
||||||
const platform = this._plt;
|
const platform = this._plt;
|
||||||
|
|
||||||
platform.cancelTimeout(this._tmr);
|
if (this._tmr) {
|
||||||
|
platform.cancelTimeout(this._tmr);
|
||||||
|
this._tmr = null;
|
||||||
|
}
|
||||||
this._openAmount = openAmount;
|
this._openAmount = openAmount;
|
||||||
|
|
||||||
if (isFinal) {
|
if (isFinal) {
|
||||||
|
@ -43,7 +43,9 @@ export class NavPop {
|
|||||||
onClick(): boolean {
|
onClick(): boolean {
|
||||||
// If no target, or if target is _self, prevent default browser behavior
|
// If no target, or if target is _self, prevent default browser behavior
|
||||||
if (this._nav) {
|
if (this._nav) {
|
||||||
this._nav.pop(null, null);
|
this._nav.pop().catch(() => {
|
||||||
|
console.debug('navPop was rejected');
|
||||||
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,9 @@ export class NavPush {
|
|||||||
@HostListener('click')
|
@HostListener('click')
|
||||||
onClick(): boolean {
|
onClick(): boolean {
|
||||||
if (this._nav && this.navPush) {
|
if (this._nav && this.navPush) {
|
||||||
this._nav.push(this.navPush, this.navParams, null);
|
this._nav.push(this.navPush, this.navParams).catch(() => {
|
||||||
|
console.debug('navPush was rejected');
|
||||||
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -81,6 +81,7 @@ export class TabsPage {
|
|||||||
alert.dismiss().then(() => {
|
alert.dismiss().then(() => {
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -110,7 +110,9 @@ export class PanGesture {
|
|||||||
pointerMove(ev: any) {
|
pointerMove(ev: any) {
|
||||||
assert(this.started === true, 'started must be true');
|
assert(this.started === true, 'started must be true');
|
||||||
if (this.captured) {
|
if (this.captured) {
|
||||||
this.onDragMove(ev);
|
this.debouncer.write(() => {
|
||||||
|
this.onDragMove(ev);
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user