[英]KendoUI Accordion not getting expanded in iPad
I have a web application running on iPad. 我有一个在iPad上运行的Web应用程序。 This application contains a Kendo UI Accordion inside it.
该应用程序内部包含一个Kendo UI手风琴 。
When the content of the page is more than the size of the screen and when I want to scroll, normal page scrolling happens ( as expected ). 当页面的内容大于屏幕的大小并且要滚动时,将发生正常的页面滚动( 如预期的那样 )。 But when try to scroll the Kendo Accordion, the page scrolling happens instead of accordion scrolling ( unexpected ).
但是,当尝试滚动Kendo手风琴时,将发生页面滚动而不是手风琴滚动( 意外 )。
I was able partly handle this issue by applying solution given by Chris Barr . 通过应用Chris Barr提供的解决方案,我能够部分解决此问题。
After applying this solution the accordion is getting scrolled instead of the whole page which I wanted. 应用此解决方案后,手风琴开始滚动,而不是我想要的整个页面。
But the problem is when I click the items on the Accordion, the accordion item doesn't get expanded. 但是问题是当我单击“手风琴”上的项目时,手风琴项目没有展开。 How can I get to work this.
我该如何工作。
function touchScroll(id){
if(isTouchDevice()){ //if touch events exist...
var el=document.getElementById(id);
var scrollStartPos=0;
document.getElementById(id).addEventListener("touchstart", function(event) {
scrollStartPos=this.scrollTop+event.touches[0].pageY;
event.preventDefault();
},false);
document.getElementById(id).addEventListener("touchmove", function(event) {
this.scrollTop=scrollStartPos-event.touches[0].pageY;
event.preventDefault();
},false);
}}
Remove event.preventDefault()
in touchstart
event listener. 在
touchstart
事件侦听器中删除event.preventDefault()
。 It will allow you to click on links inside the scrollable area. 它将允许您单击可滚动区域内的链接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.