From 6b3b07b5cc6364b30a8f5d94bc6b61f1c84506b9 Mon Sep 17 00:00:00 2001 From: qiang Date: Tue, 6 Apr 2021 18:20:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(App):=20=E4=BF=AE=E5=A4=8D=E5=AE=89?= =?UTF-8?q?=E5=8D=93=20input=20=E7=BB=84=E4=BB=B6=E8=AE=BE=E7=BD=AE=20focu?= =?UTF-8?q?s=20=E5=B1=9E=E6=80=A7=E4=B8=BA=20true=20=E6=97=B6=E9=94=AE?= =?UTF-8?q?=E7=9B=98=E6=94=B6=E5=9B=9E=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/view/mixins/field.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/view/mixins/field.js b/src/core/view/mixins/field.js index 1645a729a..2baa91f83 100644 --- a/src/core/view/mixins/field.js +++ b/src/core/view/mixins/field.js @@ -4,6 +4,7 @@ import { } from 'uni-shared' import emitter from './emitter' import keyboard from './keyboard' +import interact from './interact' UniViewJSBridge.subscribe('getSelectedTextRange', function ({ pageId, callbackId }) { const activeElement = document.activeElement @@ -29,7 +30,7 @@ let startTime export default { name: 'Field', - mixins: [emitter, keyboard], + mixins: [emitter, keyboard, interact], model: { prop: 'value', event: 'update:value' @@ -167,7 +168,10 @@ export default { return } field.focus() - plus.key.showSoftKeybord() + // 无用户交互的 webview 需主动显示键盘(安卓) + if (!this.userInteract) { + plus.key.showSoftKeybord() + } } }, _blur () { -- GitLab