Hi! It is possible to organize the same behavior for touch devices as for non touch devices in “view:list”?
Example:
If you scroll to the end of the list, the scroll event will be passed on to the parent.
If you scroll on touch devices, there is no such behavior, which in some cases may affect the negative user experience. https://snippet.webix.com/oyk24i9i
Hey @lBeJIuk, I don’t really see a way of achieving this on a touch device unfortunately, as this behaviour is specific to the browser only, and it would be pretty hard to replicate (if at all possible).
@Dzmitry
Maybe I misrepresented the problem. But that’s how HTML scroll works. If the nested view can be scrolled - scroll works on this view. If the scroll is impossible - then a parent element will be selected as a target for the scroll. https://snippet.webix.com/9nzhge4z https://i.imgur.com/t6us1CF.gifv
As a solution, I can suggest that the existing “_is_scroll” method be modified to a new one.
Here’s an example of how a new method could look: (a new configuration “myAwesomePropagate” should be added, which shows whether the transfer should be made to the parent)
_is_scroll: function (locate_mode) {
var
node = Touch._start_context.target,
webixEl,
scrollState
;
if (!env.touch && !env.transition && !env.transform) return null;
while (node && node.tagName != 'BODY') {
if (node.getAttribute) {
var mode = node.getAttribute('touch_scroll');
if (mode && (!locate_mode || mode.indexOf(locate_mode) != -1)) {
if (mode === 'y') {
if (Touch._current_context && Touch._start_context) {
webixEl = $$(node);
if (webixEl.getScrollState) {
scrollState = webixEl.getScrollState();
if (Touch._current_context.y - Touch._start_context.y > 0) {
// finger movement from top to bottom
if (Math.abs(scrollState.y) === 0 && webixEl.config.myAwesomePropagate) {
node = node.parentNode;
continue
}
} else {
// finger movement from bottom to top
if (((webixEl._dataobj.clientHeight - webixEl.$height) - 2) <= scrollState.y && webixEl.config.myAwesomePropagate) {
node = node.parentNode;
continue
}
}
}
}
}
return [node, mode]
}
}
node = node.parentNode;
}
return null;
}
```