New to Telerik Reporting? Download free 30-day trial

Disable Double Click Zooming for Telerik Reporting Html5 Report Viewer

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. 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:

<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.

In this article