telerik / kendo-angular

Issue tracker - Kendo UI for Angular
http://www.telerik.com/kendo-angular-ui/
Other
464 stars 213 forks source link

[PDFViewer] Toolbar buttons do not have explicit type #4266

Closed mbechev closed 3 months ago

mbechev commented 3 months ago

Describe the bug The toolbar buttons of the PDFViewer don't have an explicit type set. This causes issues when the PDFViewer is defined inside a form. Its being submitted when clicking any of the buttons.

Workaround Manually set the type attribute to all buttons of the PDFViewer:

https://stackblitz.com/edit/angular-tqg4os

 ngAfterViewInit() {
    const allButtons = document.querySelectorAll(
      '.k-pdf-viewer .k-toolbar .k-button'
    );
    allButtons.forEach((button) => {
      button.setAttribute('type', 'button');
    });
  }
dtopalov commented 3 months ago

Fixed in v.15.5.0