|
@@ -64,8 +64,7 @@
|
|
|
container.appendChild(textSpan)
|
|
container.appendChild(textSpan)
|
|
|
container.appendChild(datetimeSpan)
|
|
container.appendChild(datetimeSpan)
|
|
|
messageList.insertBefore(container, target)
|
|
messageList.insertBefore(container, target)
|
|
|
- container.scrollIntoView(false)
|
|
|
|
|
- version.scrollIntoView(false)
|
|
|
|
|
|
|
+ container.scrollIntoView()
|
|
|
}
|
|
}
|
|
|
function onMessageSubmit(event) {
|
|
function onMessageSubmit(event) {
|
|
|
event.preventDefault()
|
|
event.preventDefault()
|
|
@@ -127,14 +126,11 @@
|
|
|
loadMoreRequest.send(JSON.stringify(data))
|
|
loadMoreRequest.send(JSON.stringify(data))
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
- function onMessageInputFocus(e) {
|
|
|
|
|
|
|
+ messageInput.addEventListener("focus", function (e) {
|
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
|
- version.scrollIntoView(false)
|
|
|
|
|
|
|
+ version.scrollIntoView()
|
|
|
}, 500)
|
|
}, 500)
|
|
|
- }
|
|
|
|
|
- messageInput.addEventListener("focus", onMessageInputFocus)
|
|
|
|
|
- messageInput.addEventListener("input", onMessageInputFocus)
|
|
|
|
|
- window.addEventListener("native.showkeyboard", onMessageInputFocus)
|
|
|
|
|
|
|
+ })
|
|
|
window.addEventListener("pageshow", function (e) {
|
|
window.addEventListener("pageshow", function (e) {
|
|
|
messageList.firstElementChild.scrollIntoView(false)
|
|
messageList.firstElementChild.scrollIntoView(false)
|
|
|
pollMessages()
|
|
pollMessages()
|