Jump to content


Photo

3rd party touch scrolling


  • Please log in to reply
4 replies to this topic

#1 markus_ja

markus_ja
  • Members
  • 319 posts
  • LocationAustria

Posted 18 February 2016 - 11:10 AM

Hello,

 

for my web app, I use 3rd party controls, which implements its own touch scrolling in its components. I recognized, that the following SMS code line prevents touch scrolling in 3rd party components:

<script type="text/javascript">    
/* This prevents the window being moved by touches, to give the impression of a native app */
document.ontouchmove = function(e) { e.preventDefault(); }

Is it possible to delete that code instruction? Or can I reactivate the document.ontouchmove event. Since, this event is mentatory that the 3rd party touch scrolling is working. I currently work with kendo UI, but I assume other 3rd party controls work the same way.

 

Without touch scrolling, web apps are useless on mobile devices.

 

Please help!



#2 Christian-W. Budde

Christian-W. Budde
  • Members
  • 334 posts
  • LocationGermany

Posted 18 February 2016 - 11:40 AM

You can either delete it in the HTML template or specify a custom HTML template.

The global template can be found under Templates\default.html. If you delete that line it won't be present in any other projects as well.

If you want to specify a custom template locally you can right click the project manager and choose 'add template'. If you delete the line there, it will only be deleted for this very project.

#3 markus_ja

markus_ja
  • Members
  • 319 posts
  • LocationAustria

Posted 18 February 2016 - 11:48 AM

Thanks for the quick reply, but that code line is generated by the linker, with all other code:

<?pas=Compiler.InlineScriptTag?>

Removing that line, no code at all is added.Therefore, I cannot change the template.



#4 Christian-W. Budde

Christian-W. Budde
  • Members
  • 334 posts
  • LocationGermany

Posted 18 February 2016 - 12:42 PM

You have to change the script tag '<?pas=Compiler.InlineScriptTag?>' to something simpler like
 
<script type="text/javascript">
window.onload = function () { %appcode% }
</script>
I'll make sure that the critical line will be moved from the linker part into the framework as for my projects I don't need that line as well.
Not sure if the fix will make it into the next release as it might break (or at least alter the behavior of ) existing code, but I'll try.
  • Nico Wouterse likes this

#5 markus_ja

markus_ja
  • Members
  • 319 posts
  • LocationAustria

Posted 18 February 2016 - 01:01 PM

Thanks! That works very well :)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users