Commit 3dff81ae authored by JingChao's avatar JingChao

Update fastclick.js

parent 8d3b7580
...@@ -168,8 +168,11 @@ ...@@ -168,8 +168,11 @@
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' if(contentPaddingBottom){
clickElement.fastClickScrollParent.style.paddingBottom = '0px' clickElement.fastClickScrollParent.style.paddingBottom = contentPaddingBottom+'px'
}else{
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
} }
...@@ -375,8 +378,12 @@ ...@@ -375,8 +378,12 @@
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' if(contentPaddingBottom){
// targetElement.fastClickScrollParent.style.transform = "translate(0px, 0px) scale(1) translateZ(0px)" targetElement.fastClickScrollParent.style.paddingBottom = contentPaddingBottom + 'px'
}else{
targetElement.fastClickScrollParent.style.paddingBottom = '0px'
}
targetElement.fastClickScrollParent.style.transform = "translate(0px, 0px) scale(1) translateZ(0px)"
break break
} }
parentElement = parentElement.parentElement parentElement = parentElement.parentElement
...@@ -845,13 +852,7 @@ ...@@ -845,13 +852,7 @@
if (scollHeight) { if (scollHeight) {
scollFlag = true scollFlag = true
targetElement.fastClickScrollParent.style.paddingBottom = (scollHeight+20) + 'px' targetElement.fastClickScrollParent.style.paddingBottom = (scollHeight+20) + 'px'
// targetElement.fastClickScrollParent.scrollTop= (scrollTop + scollHeight)
targetElement.fastClickScrollParent.style.transition = 'all .2s cubic-bezier(0.165, 0.84, 0.44, 1) 0s'; targetElement.fastClickScrollParent.style.transition = 'all .2s cubic-bezier(0.165, 0.84, 0.44, 1) 0s';
/*targetElement.fastClickScrollParent.style.webkitTransform = "translate(0px, -"+scollHeight+"px) scale(1) translateZ(0px)"
targetElement.fastClickScrollParent.style.MozTransform = "translate(0px, -"+scollHeight+"px) scale(1) translateZ(0px)"
targetElement.fastClickScrollParent.style.msTransform = "translate(0px, -"+scollHeight+"px) scale(1) translateZ(0px)"
targetElement.fastClickScrollParent.style.OTransform = "translate(0px, -"+scollHeight+"px) scale(1) translateZ(0px)"*/
targetElement.fastClickScrollParent.style.transform = "translate(0px, -"+scollHeight+"px) scale(1) translateZ(0px)" targetElement.fastClickScrollParent.style.transform = "translate(0px, -"+scollHeight+"px) scale(1) translateZ(0px)"
} }
} }
......
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