Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCommunication
chat_webview
Commits
b2551715
Commit
b2551715
authored
Jun 03, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
43069対応
parent
bd11c0f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
19 deletions
+27
-19
public_new/js/chat-room.js
+1
-9
public_new/js/chat.js
+26
-10
No files found.
public_new/js/chat-room.js
View file @
b2551715
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
()
{
...
...
public_new/js/chat.js
View file @
b2551715
...
...
@@ -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
;
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment