|
//监听键盘聊天框键盘弹出,用于调整聊天窗口高度 frmHeight为api.frameHeight
chatBox.addEventListener({
target: 'inputBar',
name: 'move'
}, function(ret,err){
if (ret.inputBarHeight > 0) {//输入框打开时
api.setFrameAttr({
name : 'chat_frm',
rect : {
h :frmHeight - ret.panelHeight
}
});
} else {//关闭时
api.setFrameAttr({
name : 'chat_frm',
rect : {
h :frmHeight
}
});
}
setTimeout(function(){
window.scrollTo(0,$api.offset($api.byId("messageList")).h);
},200)
}); |
|