2.1 KiB
title | description | type | page_title | slug | position | tags | ticketid | res_type |
---|---|---|---|---|---|---|---|---|
Disable Double Click Zooming for Telerik Reporting Html5 Report Viewer | By default double click switches between the scale modes of the viewer. Here we explain how to disable this behavior. | how-to | Disable Switching Between Scale Modes on Double Click. | disable-switching-between-scale-modes-with-double-click. | 1422303 | kb |
Environment
Product | Progress® Telerik® Reporting |
Description
Double-click in the Html5 Viewer content area switches between the Scale modes full page, page width and custom scale factor - [Report Viewer Initialization]({%slug telerikreporting/using-reports-in-applications/display-reports-in-applications/web-application/html5-report-viewer/api-reference/report-viewer-initialization%}). The double-tap functionality is set via kendoTouch settings on creating the viewer's HTML elements in the telerikReportViewer JavaScript file.
Solution
The easiest option to remove this functionality is by unbinding the "doubletap" event in the pageReady event of the viewer. For this purpose you may add the following handler for the pageReady [Client Event]({%slug telerikreporting/using-reports-in-applications/display-reports-in-applications/web-application/html5-report-viewer/api-reference/reportviewer/events/pageready(e,-args)%}):
<script>
function onReady(e, args) {
var kendoTouch = $(".trv-pages-area").data("kendoTouch");
if (kendoTouch) {
kendoTouch.unbind("doubletap");
}
}
$(document).ready(function () {
$("#reportViewer1")
.telerik_ReportViewer({
...
pageReady: onReady
});
});
</script>
With the above changes, the double-click in the viewer will be handled by the default browser double-click behavior. Generally, it will select the region where the user has clicked.