Unplanned
Last Updated: 06 Jun 2024 08:18 by Ron
Miroslav
Created on: 07 Mar 2023 13:59
Category: PDFViewer
Type: Bug Report
5
Searching in the PDF Viewer with the magnifier causes the component to freeze while typing
Open a PDF file in the PDF Viewer. Tap the magnifier icon to initiate the search. Start typing, the component freezes. 
1 comment
Ron
Posted on: 06 Jun 2024 08:18

When typing very fast we can even get the component to crash with a javascript errors.

In our example we had a 54 page pdf and the crash happened after the user typed "te" followed by an enter within a few seconds.

 

 *   **SOURCE :** System.Private.CoreLib
*   **STACKTRACE :** at Microsoft.JSInterop.JSRuntime.InvokeAsync\[TValue\](Int64 targetInstanceId, String identifier, Object\[\] args) at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object\[\] args) at Telerik.Blazor.Components.TelerikPdfViewer.GoToNextSearchMatchAsync() at Telerik.Blazor.Components.TelerikPdfViewer.OnSearchPanelCommandExecute(PdfViewerSearchPanelCommandArgs args) at Telerik.Blazor.Components.PdfViewer.Search.PdfViewerSearchPanel.TriggerCommandExecuteAsync(PdfViewerSearchPanelCommandArgs args) at Telerik.Blazor.Components.PdfViewer.Search.PdfViewerSearchPanel.TriggerCommandExecuteAsync(String commandName) at Telerik.Blazor.Components.PdfViewer.Search.PdfViewerSearchPanel.GoToNextSearchMatchAsync() at Telerik.Blazor.Components.PdfViewer.Search.PdfViewerSearchPanel.OnKeyDown(KeyboardEventArgs args) at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
*   \----------
*   Cannot read properties of undefined (reading 'markNextMatch') TypeError: Cannot read properties of undefined (reading 'markNextMatch') at D (https://localhost:44346/\_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:1:1207509) at d.goToNextSearchMatch (https://localhost:44346/\_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:50:1341737) at s.goToNextSearchMatch (https://localhost:44346/\_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:50:1347150) at e.invokeComponentMethod (https://localhost:44346/\_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:50:1112740) at https://localhost:44346/\_framework/blazor.web.js:1:3244 at new Promise () at y.beginInvokeJSFromDotNet (https://localhost:44346/\_framework/blazor.web.js:1:3201) at gn.\_invokeClientMethod (https://localhost:44346/\_framework/blazor.web.js:1:62841) at gn.\_processIncomingData (https://localhost:44346/\_framework/blazor.web.js:1:60316) at connection.onreceive (https://localhost:44346/\_framework/blazor.web.js:1:53957)