Attaching a touch event handler on ScrollView breaks the scrolling
See original GitHub issueAttaching a touch event handler like touchstart
or touchend
to a ScrollView makes the scroll view not scrollable.
var page = tabris.create("Page", {
title: "Scroll Composite - Horizontal",
topLevel: true
});
var scrollView = tabris.create("ScrollView", {
direction: "horizontal",
layoutData: {left: 0, top: [40, 0], right: 0, bottom: [40, 0]},
background: "#234"
}).on("touchstart", function(event) {
console.log("touchstart triggered: " + JSON.stringify(event));
}).appendTo(page);
for (var i = 0; i < 50; i++) {
tabris.create("TextView", {
layoutData: {left: i * 30 + 20, centerY: 0, width: 30},
text: i + "°",
foreground: "white"
}).appendTo(scrollView);
}
page.open();
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Android View stops receiving touch events when parent scrolls
I have a custom Android view which overrides onTouchEvent(MotionEvent) to handle horizontal scrolling of content within the view.
Read more >Manage touch events in a ViewGroup - Android Developers
Handling touch events in a ViewGroup takes special care, ... However, if you press buttons in the child view, or scroll the child...
Read more >ScrollView - .NET MAUI - Microsoft Learn
NET MAUI) ScrollView is a view that's capable of scrolling its content. By default, ScrollView scrolls its content vertically.
Read more >Pager's scroll blocks the ScrollView's scroll · Issue #18 - GitHub
Basically, if a Pager view is placed inside a ScrollView with vertical scroll, the former blocks the parent's scroll, unless the drag gesture...
Read more >react horizontal swipe
React Swipeable React swipe event handler hook Github Pages Demo Api Use ... doesn't break the window horizontal scroll by adding the addEventListener...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
tap
gesture works fine. Currentlytouchstart
blocks scrolling on Android, but works on iOS. Possible use case would be implementingfocus out
for custom widgets in a scroll view.I just retested the snippet above with the currently
nightly
and found that the Android client does fire the touch start event, while ios does not.