Commit 8d3b7580 authored by JingChao's avatar JingChao

Update fastclick.js

parent c0619a2f
...@@ -168,6 +168,7 @@ ...@@ -168,6 +168,7 @@
window.addEventListener('native.keyboardhide', function (e) { window.addEventListener('native.keyboardhide', function (e) {
if(scollFlag){ if(scollFlag){
scollFlag=false scollFlag=false
//clickElement.fastClickScrollParent.style.paddingBottom = contentPaddingBottom+'px'
clickElement.fastClickScrollParent.style.paddingBottom = '0px' clickElement.fastClickScrollParent.style.paddingBottom = '0px'
clickElement.fastClickScrollParent.style.transform = "translate(0px, 0px) scale(1) translateZ(0px)" clickElement.fastClickScrollParent.style.transform = "translate(0px, 0px) scale(1) translateZ(0px)"
clickElement.fastClickScrollParent.scrollTop = scrollTop clickElement.fastClickScrollParent.scrollTop = scrollTop
...@@ -374,8 +375,8 @@ ...@@ -374,8 +375,8 @@
if (parentElement.classList.contains('content')) { if (parentElement.classList.contains('content')) {
scrollParent = parentElement scrollParent = parentElement
targetElement.fastClickScrollParent = parentElement targetElement.fastClickScrollParent = parentElement
targetElement.fastClickScrollParent.style.paddingBottom = '0px' // targetElement.fastClickScrollParent.style.paddingBottom = '0px'
targetElement.fastClickScrollParent.style.transform = "translate(0px, 0px) scale(1) translateZ(0px)" // targetElement.fastClickScrollParent.style.transform = "translate(0px, 0px) scale(1) translateZ(0px)"
break break
} }
parentElement = parentElement.parentElement parentElement = parentElement.parentElement
...@@ -839,7 +840,7 @@ ...@@ -839,7 +840,7 @@
var keyBoardHeight = getKeyBoardHeight() var keyBoardHeight = getKeyBoardHeight()
clickElement = targetElement clickElement = targetElement
scrollTop = targetElement.fastClickScrollParent.scrollTop scrollTop = targetElement.fastClickScrollParent.scrollTop
contentPaddingBottom = Number(targetElement.style.paddingBottom.replace('px', '')) contentPaddingBottom = Number(targetElement.fastClickScrollParent.style.paddingBottom.replace('px', ''))
var scollHeight = (innerHeight - pointY) < keyBoardHeight ? (keyBoardHeight - (innerHeight - pointY)) : 0 var scollHeight = (innerHeight - pointY) < keyBoardHeight ? (keyBoardHeight - (innerHeight - pointY)) : 0
if (scollHeight) { if (scollHeight) {
scollFlag = true scollFlag = true
......
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