mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 13:32:54 +08:00
fix(clickblock): add NavOptions.minClickBlockDuration
* feat(clickblock): ability to set a minimum duration for click block * fix(clickblock): add NavOptions.minClickBlockDuration
This commit is contained in:

committed by
Justin Willis

parent
3f164237ae
commit
8ca9797c0f
@ -663,7 +663,7 @@ export class NavControllerBase extends Ion implements NavController {
|
||||
if (duration > DISABLE_APP_MINIMUM_DURATION && opts.disableApp !== false) {
|
||||
// if this transition has a duration and this is the root transition
|
||||
// then set that the app is actively disabled
|
||||
this._app.setEnabled(false, duration + ACTIVE_TRANSITION_OFFSET);
|
||||
this._app.setEnabled(false, duration + ACTIVE_TRANSITION_OFFSET, opts.minClickBlockDuration);
|
||||
} else {
|
||||
console.debug('transition is running but app has not been disabled');
|
||||
}
|
||||
|
@ -162,6 +162,7 @@ export interface NavOptions {
|
||||
keyboardClose?: boolean;
|
||||
progressAnimation?: boolean;
|
||||
disableApp?: boolean;
|
||||
minClickBlockDuration?: number;
|
||||
ev?: any;
|
||||
updateUrl?: boolean;
|
||||
isNavRoot?: boolean;
|
||||
|
@ -167,6 +167,12 @@ export class ViewController {
|
||||
if (!this._nav) {
|
||||
return Promise.resolve(false);
|
||||
}
|
||||
if (this.isOverlay && !navOptions.minClickBlockDuration) {
|
||||
// This is a Modal being dismissed so we need
|
||||
// to add the minClickBlockDuration option
|
||||
// for UIWebView
|
||||
navOptions.minClickBlockDuration = 400;
|
||||
}
|
||||
this._dismissData = data;
|
||||
this._dismissRole = role;
|
||||
|
||||
|
Reference in New Issue
Block a user