提交 dae724b1 编写于 作者: Q qiang

fix: 修复安卓调用 setSoftinputTemporary 后 adjustResize 配置失效的问题

上级 4406a413
...@@ -60,12 +60,9 @@ export default { ...@@ -60,12 +60,9 @@ export default {
plusReady(() => { plusReady(() => {
const currentWebview = plus.webview.currentWebview() const currentWebview = plus.webview.currentWebview()
const style = currentWebview.getStyle() || {} const style = currentWebview.getStyle() || {}
if (style.softinputMode === 'adjustResize') {
return
}
const rect = this.$el.getBoundingClientRect() const rect = this.$el.getBoundingClientRect()
currentWebview.setSoftinputTemporary && currentWebview.setSoftinputTemporary({ currentWebview.setSoftinputTemporary && currentWebview.setSoftinputTemporary({
mode: this.adjustPosition ? 'adjustPan' : 'nothing', mode: style.softinputMode === 'adjustResize' ? 'adjustResize' : (this.adjustPosition ? 'adjustPan' : 'nothing'),
position: { position: {
top: rect.top, top: rect.top,
height: rect.height + (Number(this.cursorSpacing) || 0) height: rect.height + (Number(this.cursorSpacing) || 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册