Commit e655dd62 by Lee Munkyeong

43069対応。

parent 36e3ca40
......@@ -3,6 +3,14 @@ var socket;
// 名前空間
var CHAT_SOCKET = {};
CHAT_SOCKET.socketCheck = function () {
if(socket == null || socket.disconnected) {
window.location.reload();
}
}
CHAT_SOCKET.connectSocket = function () {
if (IS_ONLINE == 'true') {
socket = io(CHAT_SERVER_URL);
......
......@@ -382,23 +382,23 @@ $(function() {
var afterHeight = window.innerHeight;
var afterWidth = window.innerWidth;
var moreScroll = beforeHeight - afterHeight;
if (beforeHeight > afterHeight) {
if (beforeHeight > afterHeight && (beforeHeight - afterHeight) > 50) {
if (beforeWidth == afterWidth) {
//キーボード表示時
$('.room_container').css('margin-bottom', 0);
window.scrollTo(0, beforeScroll + moreScroll - $('.footer_content_b').height());
} else {
//画面回転時
window.scrollTo(0, beforeScroll + moreScroll);
window.scrollTo(0, beforeScroll + (moreScroll * 2) - $('.footer_content_b').height());
}
} else {
} else if (beforeHeight < afterHeight) {
$('.room_container').css('margin-bottom', footerHeight);
if (beforeWidth == afterWidth) {
//キーボード非表示
window.scrollTo(0, beforeScroll + moreScroll + $('.footer_content_b').height());
} else {
//画面回転時
window.scrollTo(0, beforeScroll + moreScroll);
window.scrollTo(0, beforeScroll + (moreScroll * 2) + $('.footer_content_b').height());
}
}
beforeHeight = window.innerHeight;
......
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