|
- var frameht = api.frameHeight;//获取全局窗口高度
- //监听键盘聊天框键盘弹出,用于调整聊天窗口高度
- UIChatBox.addEventListener({
- target: 'inputBar',
- name: 'move'
- }, function(ret,err){
-
- if(ret.panelHeight>0){
- api.setFrameAttr({
- name: 'chat_frm',
- rect: {
- h:frameht-ret.panelHeight
- },
- });
- }else{
- api.setFrameAttr({
- name: 'chat_frm',
- rect: {
- h:frameht
- },
- });
-
- }
-
- setTimeout(function(){
- window.scrollTo(0,$api.offset($api.byId("contact")).h);
- },20)
-
- });
复制代码
这是我app里的代码 你看下吧 |
|