kendo-ui-core
kendo-ui-core copied to clipboard
The zoom tool in the PDFViewer's toolbar is disabled when it is in the overflow menu
Bug report
Reproduction of the problem
Reproducible in the demos: https://demos.telerik.com/kendo-ui/pdfviewer/index
- Shrink the browser window so that the zoom tool goes into the overflow menu.
- 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]
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"));
}