diff -urN ../roundcubemail-1.6.1.orig/program/js/common.js ./program/js/common.js --- ../roundcubemail-1.6.1.orig/program/js/common.js 2023-01-23 22:03:14.000000000 +0200 +++ ./program/js/common.js 2023-04-23 10:42:06.902908000 +0300 @@ -218,6 +218,28 @@ }, /** + * Return absolute touch position of an event + */ +get_touch_pos: function(e) +{ + if (!e) e = window.event; + var mX = (e.touches[0].pageX) ? e.touches[0].pageX : e.touches[0].clientX, + mY = (e.touches[0].pageY) ? e.touches[0].pageY : e.touches[0].clientY; + + if (document.body && document.all) { + mX += document.body.scrollLeft; + mY += document.body.scrollTop; + } + + if (e._offset) { + mX += e._offset.left; + mY += e._offset.top; + } + + return { x:mX, y:mY }; +}, + +/** * Add an object method as event listener to a certain element */ add_listener: function(p)