mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
feat(clickBlock): enable click block only on iOS
This commit is contained in:
@ -10,7 +10,8 @@ import {ScrollTo} from '../../animations/scroll-to';
|
|||||||
*/
|
*/
|
||||||
export class IonicApp {
|
export class IonicApp {
|
||||||
|
|
||||||
constructor(fastdom) {
|
constructor(config, fastdom) {
|
||||||
|
this._config = config;
|
||||||
this._fastdom = fastdom;
|
this._fastdom = fastdom;
|
||||||
this._titleSrv = new Title();
|
this._titleSrv = new Title();
|
||||||
this._title = '';
|
this._title = '';
|
||||||
@ -47,7 +48,9 @@ export class IonicApp {
|
|||||||
*/
|
*/
|
||||||
setEnabled(isEnabled, fallback=700) {
|
setEnabled(isEnabled, fallback=700) {
|
||||||
this._disTime = (isEnabled ? 0 : Date.now() + fallback);
|
this._disTime = (isEnabled ? 0 : Date.now() + fallback);
|
||||||
ClickBlock(!isEnabled, fallback + 100);
|
if (this._config.get('clickBlock')) {
|
||||||
|
ClickBlock(!isEnabled, fallback + 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -24,7 +24,6 @@ import * as dom from '../util/dom';
|
|||||||
export function ionicProviders(args={}) {
|
export function ionicProviders(args={}) {
|
||||||
let fastdom = new FastDom();
|
let fastdom = new FastDom();
|
||||||
|
|
||||||
let app = new IonicApp(fastdom);
|
|
||||||
let platform = new Platform();
|
let platform = new Platform();
|
||||||
let navRegistry = new NavRegistry(args.pages);
|
let navRegistry = new NavRegistry(args.pages);
|
||||||
|
|
||||||
@ -40,6 +39,8 @@ export function ionicProviders(args={}) {
|
|||||||
platform.load();
|
platform.load();
|
||||||
config.setPlatform(platform);
|
config.setPlatform(platform);
|
||||||
|
|
||||||
|
let app = new IonicApp(config, fastdom);
|
||||||
|
|
||||||
let events = new Events();
|
let events = new Events();
|
||||||
initTapClick(window, document, app, config, fastdom);
|
initTapClick(window, document, app, config, fastdom);
|
||||||
let featureDetect = new FeatureDetect();
|
let featureDetect = new FeatureDetect();
|
||||||
|
@ -70,6 +70,7 @@ Platform.register({
|
|||||||
'iphone'
|
'iphone'
|
||||||
],
|
],
|
||||||
settings: {
|
settings: {
|
||||||
|
clickBlock: true,
|
||||||
hoverCSS: false,
|
hoverCSS: false,
|
||||||
keyboardHeight: 300,
|
keyboardHeight: 300,
|
||||||
mode: 'ios',
|
mode: 'ios',
|
||||||
|
Reference in New Issue
Block a user