Skip to content

Commit 0e873fd

Browse files
committed
CLOUD-15324 webim iframe 形式,微信网页中集成客服web 访客端,输入信息完成后,输入框不能自动收回
1 parent 8c9c02d commit 0e873fd

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/js/app/pages/main/chat.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,14 +736,15 @@ function _bindEvents(){
736736
document.body.scrollTop = 9999;
737737
}
738738
}, 500);
739+
utils.removeClass(document.body, "em-mobile-translate");
739740
});
740741
// CLOUD-15103 解决 ios 部分手机点击输入框失焦后输入框不能自动收回问题
741742
utils.on(doms.textInput, "blur", function(){
742743
setTimeout(function(){
743744
// document.body.scrollTop = 9999; // 在 iframe 下会有问题
744-
document.body.scrollIntoView(false); // 元素的底端将和其所在滚动区的可视区域的底端对齐
745-
alert("test");
746-
}, 500);
745+
// document.body.scrollIntoView(false); // 元素的底端将和其所在滚动区的可视区域的底端对齐 加载 iframe 的页面和 easemob.js 不在同一个域会出现问题。原因未知
746+
utils.addClass(document.body, "em-mobile-translate");
747+
}, 0);
747748
});
748749
}
749750

src/scss/body.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ body.big-window{
2323
bottom: 0;
2424
}
2525
}
26+
.em-mobile-translate{
27+
transform: translateY(1px);
28+
}
2629
.em-widget-risk-warning{
2730
width:100%;
2831
box-sizing: border-box;

0 commit comments

Comments
 (0)