kendo-ui-core icon indicating copy to clipboard operation
kendo-ui-core copied to clipboard

The zoom tool in the PDFViewer's toolbar is disabled when it is in the overflow menu

Open IvanDanchev opened this issue 4 years ago • 1 comments

Bug report

Reproduction of the problem

Reproducible in the demos: https://demos.telerik.com/kendo-ui/pdfviewer/index

  1. Shrink the browser window so that the zoom tool goes into the overflow menu.
  2. Click on the overflow button to open the menu.

Current behavior

The zoom tool is disabled.

Expected/desired behavior

The zoom tool is enabled.

Environment

  • Kendo UI version: 2021.1.330
  • jQuery version: x.y
  • Browser: [all]

IvanDanchev avatar Apr 14 '21 09:04 IvanDanchev

Also reported in ticket 1569578

A possible workaround is to check whether the user is on a mobile device and if so remove the k-disabled class:

if(kendo.support.mobileOS){
    var pdfViewer = $("#pdfViewer").getKendoPDFViewer();
    var commands = pdfViewer.toolbar.popup.element.find('[data-command="ZoomCommand"] > a').each((idx,itm) => $(itm).removeClass("k-disabled"));
}

sample dojo

aleksandarevangelatov avatar Jun 20 '22 12:06 aleksandarevangelatov