我在离子项内部有一个离子输入,我意识到在点击离子输入后它会停止接收焦点。经过一些调试后,我注意到它开始触发离子项上的click事件,而不是将焦点放在离子输入上。此错误仅发生在类型不是“文本”的离子输入上。我也试图删除所有的CSS类,但bug仍然存在。通常,在2次点击后会发生错误。
错误也发生在'text'类型的离子输入上,但是在更新了一些包并从app.component.ts文件中删除"this.statusBar.overlaysWebView(true);"
之后,问题就解决了,但仅限于离子 - 输入'文本'类型。此外,该错误仅发生在离子项内的离子输入上。
这是离子项内的离子输入的html
<ion-item >
<ion-label floating>E-mail</ion-label>
<ion-input type="email"></ion-input>
</ion-item>
这是我的package.json文件
{
"name": "MyApp",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/common": "5.0.0",
"@angular/compiler": "5.0.0",
"@angular/compiler-cli": "5.0.0",
"@angular/core": "5.0.0",
"@angular/forms": "5.0.0",
"@angular/http": "5.0.0",
"@angular/platform-browser": "5.0.0",
"@angular/platform-browser-dynamic": "5.0.0",
"@ionic-native/app-version": "^3.12.1",
"@ionic-native/camera": "^3.12.1",
"@ionic-native/core": "4.3.2",
"@ionic-native/date-picker": "^3.12.1",
"@ionic-native/device": "^3.12.1",
"@ionic-native/file": "^3.12.1",
"@ionic-native/file-chooser": "^3.12.1",
"@ionic-native/file-opener": "^3.12.1",
"@ionic-native/file-transfer": "^4.1.0",
"@ionic-native/firebase": "^4.3.1",
"@ionic-native/geolocation": "^3.12.1",
"@ionic-native/google-plus": "^3.12.1",
"@ionic-native/in-app-browser": "^3.12.1",
"@ionic-native/network": "^3.12.1",
"@ionic-native/push": "^3.10.3",
"@ionic-native/qr-scanner": "^4.3.1",
"@ionic-native/splash-screen": "4.3.2",
"@ionic-native/status-bar": "4.3.2",
"@ionic-native/toast": "^3.13.0",
"@ionic-native/transfer": "^3.12.1",
"@ionic/storage": "2.1.3",
"@types/google-maps": "^3.2.0",
"angularfire2": "^5.0.0-rc.2",
"cordova-android": "^6.2.3",
"cordova-browser": "^4.1.0",
"cordova-ios": "^4.4.0",
"cordova-plugin-app-version": "^0.1.9",
"cordova-plugin-camera": "^2.4.1",
"cordova-plugin-compat": "^1.1.0",
"cordova-plugin-console": "^1.1.0",
"cordova-plugin-datepicker": "^0.9.3",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-file": "^4.3.3",
"cordova-plugin-file-opener2": "^2.0.19",
"cordova-plugin-file-transfer": "^1.6.3",
"cordova-plugin-filechooser": "^1.0.1",
"cordova-plugin-firebase": "^0.1.24",
"cordova-plugin-geolocation": "^2.4.3",
"cordova-plugin-googleplus": "^5.1.1",
"cordova-plugin-inappbrowser": "^1.7.1",
"cordova-plugin-ionic-webview": "^1.1.11",
"cordova-plugin-network-information": "^1.3.3",
"cordova-plugin-qrscanner": "^2.5.0",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.3",
"cordova-plugin-whitelist": "^1.3.1",
"cordova-plugin-x-toast": "^2.6.0",
"cordova-sqlite-storage": "^2.0.4",
"firebase": "^4.5.0",
"font-awesome": "^4.7.0",
"intl": "^1.2.5",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"jquery": "^3.2.1",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "3.1.0",
"@ionic/cli-plugin-ionic-angular": "1.4.1",
"ionic": "3.18.0",
"typescript": "2.4.2",
"@angular/cli": "^1.0.4",
"@angular/compiler-cli": "^4.1.0",
"@ionic/cli-plugin-cordova": "1.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-geolocation": {},
"cordova-sqlite-storage": {},
"cordova-plugin-firebase": {},
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-network-information": {},
"cordova-plugin-app-version": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-filechooser": {},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": "<Cliente ID>"
},
"cordova-plugin-compat": {},
"cordova-plugin-camera": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-file": {},
"cordova-plugin-file-opener2": {},
"cordova-plugin-datepicker": {},
"cordova-plugin-x-toast": {},
"cordova-plugin-qrscanner": {},
"cordova-plugin-ionic-webview": {}
},
"cordova-plugin-network-information": {},
"platforms": [
"android",
"browser",
"ios"
]
},
"config": {
"ionic_copy": "./scripts/copy-custom-lib.js"
}
}