[英]stopPropagation on ion-scroll when i scroll on the table element
我在用angularJs制作的離子滾動元素中有2個表:
<ion-view>
<ion-scroll class="has-header has-footer" scrollbar-y="false" direction="y">
<div ng-controller="calendCtrl" >
<div id="t1" class="CSSTableGenerator" >
<table class="planner" isolateScrolling>
<tr ng-repeat="row in calendarData track by $index">
<td colspan="{{day.colspan}}" title="{{day.title}}"
ng-class="day.class"
ng-click="calendarCellClick($parent.$index,$index)"
ng-repeat="day in row track by $index">
{{day.descr}}
</td>
</tr>
</table>
</div>
<div id="t2" class="CSSTableGenerator" >
<table class="planner" isolateScrolling>
<tr ng-repeat="row in calendarData track by $index">
<td colspan="{{day.colspan}}" title="{{day.title}}"
ng-class="day.class"
ng-click="calendarCellClick($parent.$index,$index)"
ng-repeat="day in row track by $index">
{{day.descr}}
</td>
</tr>
</table>
</div>
<div>
</ion-scroll>
</ion-view>
這2個表真的很長,所以我需要兩個溢出滾動,但我需要一個離子滾動來看到這兩個表。
在Chrome瀏覽器上,如果我在鼠標指針位於第一個表格時滾動,我可以滾動第一個表格,但離子滾動元素也會滾動。
在safari上,在iPad上我只能滾動離子滾動視圖,但我不能對表格做同樣的事情。
我該如何管理?
更新1
在Firefox和Chrome上, stopPropagation指令解決了雙滾動行為,但iPad上的表仍然無法解析。
更新2
我在長形式的選擇輸入元素中滾動iPad有同樣的問題,我可以滾動表單而不是選擇。
Ionic 1.2在錯誤的瀏覽器滾動世界中修復了很多bug。
使用從涼亭安裝的1.2.4,現在一切都工作得如何。
對我來說唯一不起作用的是屬性scrollbar-y="false"
,它不會隱藏滾動條。
以下是該表的CSS:
table.planner {
overflow-y: auto;
-webkit-overflow-scrolling: touch;
overflow-x: hidden;
}
它可以在Safari iPad2上使用overflow-y: scroll;
太。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.