Commit b2551715 by Lee Munkyeong

43069対応

parent bd11c0f8
var lastscrollvalue;
window.onscroll = function() {
var scrollPosition = window.scrollY || document.documentElement.scrollTop;
if (scrollPosition == 0) {
console.log('Scroll on TOP!!');
//TODO add getMessages(newLine);
if (CHAT_UTIL.isIOS()) {
} else if (CHAT_UTIL.isAndroid()) {
//android.getMessages()
}
}
beforeScroll = window.scrollY;
}
$('#roomNameChangeBtn').click(function() {
......
......@@ -11,6 +11,10 @@ CHAT.globalLoginParameter;
// fermi coview share
let globalUserInfo = new Object();
var beforeHeight = window.innerHeight;
var beforeWidth = window.innerWidth;
var beforeScroll;
CHAT.saveRoomInfo = function(roomId, roomName) {
CHAT.globalLoginParameter.roomId = roomId;
CHAT.globalLoginParameter.roomName = roomName;
......@@ -372,26 +376,38 @@ $(function() {
}
});
var beforeHeight;
var beforeScroll;
var footerHeight = $('.footer-wrap').height();
window.addEventListener("resize", function() {
console.log('aaaa');
var afterHeight = window.innerHeight;
var afterWidth = window.innerWidth;
var moreScroll = beforeHeight - afterHeight;
if (beforeHeight > afterHeight) {
//キーボード表示時
var moreScroll = beforeHeight - afterHeight;
$('.room_container').css('margin-bottom', 0);
window.scrollTo(0, beforeScroll + moreScroll - $('.footer_content_b').height());
if (beforeWidth == afterWidth) {
//キーボード表示時
$('.room_container').css('margin-bottom', 0);
window.scrollTo(0, beforeScroll + moreScroll - $('.footer_content_b').height());
} else {
//画面回転時
window.scrollTo(0, beforeScroll + moreScroll);
}
} else {
//キーボード非表示
$('.room_container').css('margin-bottom', footerHeight);
window.scrollTo(0, beforeScroll);
if (beforeWidth == afterWidth) {
//キーボード非表示
window.scrollTo(0, beforeScroll + moreScroll + $('.footer_content_b').height());
} else {
//画面回転時
window.scrollTo(0, beforeScroll + moreScroll);
}
}
beforeHeight = window.innerHeight;
beforeWidth = window.innerWidth;
});
$('#messageInput').focusin(function(e) {
beforeHeight = window.innerHeight;
beforeWidth = window.innerWidth;
beforeScroll = window.scrollY;
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment