In version 15.1.0, the Editor causes a browser freeze when it contains a custom tool and the Value is changed programmatically. It works as expected in version 15.0.1.
The issue occurs only in WebAssembly apps.
Test page:
@using Telerik.Blazor.Components.Editor
<TelerikButton OnClick="@(() => EditorValue = "<p>baz</p><p>baz</p>")" ButtonType="@ButtonType.Button">Change Editor Value</TelerikButton>
<TelerikEditor Tools="@EditorTools"
@bind-Value="@EditorValue">
<EditorCustomTools>
<EditorCustomTool Name="CustomEditorTool">
custom tool here
</EditorCustomTool>
</EditorCustomTools>
</TelerikEditor>
@code {
private string EditorValue { get; set; } = @"<p>foo</p><p>bar</p>";
private List<IEditorTool> EditorTools { get; set; } = new();
protected override void OnInitialized()
{
EditorTools.Add(new CustomTool("CustomEditorTool"));
base.OnInitialized();
}
}
Hello,
When a Grid is using multi column headers, and I add one more column in the OnBeforeExport event, this new column has no title in the exported file.
A possible workaround might be to use a column with zero Width and change the width in OnBeforeExport.
@using Telerik.Blazor.Common.Export.Excel
@using Telerik.Blazor.Components.Grid
<TelerikGrid TItem="@FlowRun"
Pageable="true"
OnRead="@GetData">
<GridToolBar>
<GridCommandButton Command="ExcelExport" Icon="file-excel">Export to Excel</GridCommandButton>
<GridCommandButton Command="CsvExport" Icon="file-csv">Export to CSV</GridCommandButton>
<label class="k-checkbox-label"><TelerikCheckBox @bind-Value="@ExportAllPages" />Export All Pages</label>
</GridToolBar>
<GridExport>
<GridExcelExport FileName="telerik-grid-export" AllPages="@ExportAllPages" OnBeforeExport="@BeforeExcelExport" />
<GridCsvExport FileName="telerik-grid-export" AllPages="@ExportAllPages" OnBeforeExport="@BeforeCsvExport" />
</GridExport>
<GridColumns>
<GridColumn Field="@nameof(FlowRun.FileName)" Title="File Name" Width="300px" />
<GridColumn Field="@nameof(FlowRun.Type)" Title="Type" Width="100px" />
<GridColumn Field="@nameof(FlowRun.FileSize)" Title="File Size" Width="200px" />
<GridColumn Title="Source">
<Columns>
<GridColumn Field="@(nameof(FlowRun.Source))" Title="MPID"/>
<GridColumn Field="@(nameof(FlowRun.SourceFileProtocol))" Title="Type" />
</Columns>
</GridColumn>
<GridColumn Field="@nameof(FlowRun.ErrorMessage)"
Title = "Error"
Width="0" />
</GridColumns>
</TelerikGrid>
@code {
bool ExportAllPages { get; set; }
private async Task GetData(GridReadEventArgs args)
{
args.Data = Enumerable.Range(1, 10).Select(x => new FlowRun
{
FileName = $"File {x}",
Type = $"Type {x}",
FileSize = x * 2,
Source = $"Source {x}",
SourceFileProtocol = FileProtocol.CIX,
ErrorMessage = $"Error {x}"
}).ToList();
args.Total = 100;
}
private void BeforeCsvExport(GridBeforeCsvExportEventArgs obj)
{
AddErrorMessageColumn(obj);
}
private void BeforeExcelExport(GridBeforeExcelExportEventArgs obj)
{
AddErrorMessageColumn(obj);
}
private void AddErrorMessageColumn(GridBeforeSpreadsheetExportEventArgs args)
{
args.Columns.Find(x => x.Field == nameof(FlowRun.ErrorMessage)).Width = "100px";
//args.Columns.Add(new ExcelExportableColumn
//{
// Field = nameof(FlowRun.ErrorMessage),
// Title = "Error"
//});
}
public class FlowRun
{
public string FileName { get; set; }
public string Type { get; set; }
public long? FileSize { get; set; }
public string Source { get; set; }
public FileProtocol SourceFileProtocol { get; set; }
public string ErrorMessage { get; set; }
}
public enum FileProtocol
{
Unknown,
PIX,
CIX,
SS
}
}
Example:
<PageTitle>Home</PageTitle>
<div>
<TelerikTextBox Width="20rem" Placeholder="Pallet" DebounceDelay="1000" @bind-Value="@_textInput" OnChange="@(async (input) => await OnInputChanged(input))" />
</div>
<p>@_textInput</p>
@code {
private string? _textInput;
private async Task OnInputChanged(object input)
{
Console.WriteLine($"Immediate: function parameter: {input}, bound variable: {_textInput}");
await Task.Delay(1000);
Console.WriteLine($"Delayed: function parameter: {input}, bound variable: {_textInput}");
//Make the OnChange event receive the immediate value when the DebounceDelay is set
}
}The DebounceDelay is set to 1 second to highlight the behavior, although we have observed it with delays less than 100 milliseconds when the input is from a barcode scanner and the Enter is part of the scan. Start the sample, type "123" in the input, and hit enter within 1 second.
The output in the console is:
Immediate: function parameter: , bound variable:
Delayed: function parameter: , bound variable: 123
Hello,
(Also applies to AutoComplete, DropDownList, MultiSelect, MultiColumnComboBox).
When using Height="auto" in the popup settings and filtering with a dropdown above the component, the dropdown detaches from the main component.
<ComboBoxPopupSettings Height="auto"></ComboBoxPopupSettings>https://blazorrepl.telerik.com/cKkSQGFO50ovCpr829
A possible workaround is to use a MaxHeight that is less than half the browser viewport.
<ComboBoxPopupSettings Height="auto" MaxHeight="45vh"></ComboBoxPopupSettings>
The only scenario that works is to set the initial Zoom to a numeric value and have an open file by default.
(bug report only)
The label of the filter menu icon displays: “column filter menu settings”. In version 12.0.0 it included the name of the column field.
1. Run this example: https://blazorrepl.telerik.com/cKFaOPvO56rcaHqx16
2. Hover a filter icon in the Grid’s header with the mouse cursor.
(optional)
The label “column filter menu settings” appears.
The label text includes the column name, e.g., “Price column filter menu settings”.
Workaround:
https://blazorrepl.telerik.com/cUPYaPlO55EJNiKJ24
Title: WCAG 1.3.1: Ensures elements with an ARIA role that require child roles contain them (#\39 374a450-079d-4586-b823-d6bc7723505f)
Tags: Accessibility, WCAG 1.3.1, aria-required-children
Issue: Ensures elements with an ARIA role that require child roles contain them (aria-required-children - https://accessibilityinsights.io/info-examples/web/aria-required-children)
Target application: Hermes Home - https://localhost/TrafficLoss
Element path: #\39 374a450-079d-4586-b823-d6bc7723505f
Snippet: <div class="k-grid-aria-root" id="9374a450-079d-4586-b823-d6bc7723505f" role="grid" aria-label="Data table">
How to fix:
Fix any of the following:
Element has children which are not allowed (see related nodes)
Element has no aria-busy="true" attribute
Environment: Microsoft Edge version 111.0.1661.41
====
This accessibility issue was found using Accessibility Insights for Web 2.37.3 (axe-core 4.6.3), a tool that helps find and fix accessibility issues. Get more information & download this tool at http://aka.ms/AccessibilityInsights.
============================ code =============================
<TelerikGrid Data="@ViewModel.RDLInformation" TItem="TLSummary"
Pageable="true"
Sortable="true"
Groupable="false"
FilterMode="Telerik.Blazor.GridFilterMode.FilterRow"
Resizable="true"
Reorderable="true"
Height = "100%">
....
</TelerikGrid>
Environment
Grid ColumnDraggable is never destroyed
In Components/Common/Grid/Rows/TableHeaderRow.cs, Dispose() calls base.Dispose() first, which sets IsDisposed = true. It then calls DestroyColumnDraggable(), which uses InvokeAsync<object>. That method returns early when IsDisposed is true (BaseComponent.InvokeAsync<T>), so destroyColumnDraggable is never sent to the browser. DestroyColumnReorderable() and DestroyColumnResizable() work because they use InvokeVoidAsync, which has no such check.
As a result, every grid with Reorderable="true" or Groupable="true" leaves "<dataId>-telerik-ColumnDraggable" in window.TelerikBlazor._instances. Its draggable.element (the grid's .k-grid-header) keeps the whole disposed page reachable, so the page is never garbage collected.
Object.entries(TelerikBlazor._instances) .filter(([k, i]) => i && i.element && !i.element.isConnected) .map(([k, i]) => k + ' / ' + i.constructor.name)
Sample project attached.
(optional)
one "...-telerik-ColumnDraggable" entry per reorderable or groupable grid, all pointing at detached elements. Each pageA -> pageB round trip adds more, and the detached DOM is never released.
An empty array is returned. Page A's components were disposed, so their JS instances should have been destroyed.
Workaround
After each navigation, we destroy and remove any registered instance whose element is no longer in the page:
const instances = window.TelerikBlazor && window.TelerikBlazor._instances; for (const key of Object.keys(instances || {})) { const i = instances[key]; if (i && i.element && !i.element.isConnected) { try { i.destroy && i.destroy(); } catch (e) { } delete instances[key]; } }
Suggested Fix
(bug report only)
Environment
TabStrip Tab is never destroyed
Components/TabStrip/Tab.razor.cs registers each tab with initTabStripTab in OnAfterRenderAsync. Its Dispose() only releases the DotNetObjectReference; it never calls InvokeDisposeAsync(). The JS Tab.destroy() method is therefore never called, and TabStrip.destroy() does not destroy its child tabs. Every tab stays in window.TelerikBlazor._instances with its detached <li class="k-tabstrip-item">, which again keeps the disposed page reachable.
Object.entries(TelerikBlazor._instances) .filter(([k, i]) => i && i.element && !i.element.isConnected) .map(([k, i]) => k + ' / ' + i.constructor.name)
Sample project attached.
(optional)
One entry per TabStrip tab is returned, all pointing at detached elements. Each pageA -> pageB round trip adds more, and the detached DOM is never released.
An empty array is returned. PageA's components were disposed, so their JS instances should have been destroyed.
Workaround
After each navigation, we destroy and remove any registered instance whose element is no longer in the page:
const instances = window.TelerikBlazor && window.TelerikBlazor._instances; for (const key of Object.keys(instances || {})) { const i = instances[key]; if (i && i.element && !i.element.isConnected) { try { i.destroy && i.destroy(); } catch (e) { } delete instances[key]; } }
Suggested Fix
The ComboBox and MultiColumnComboBox retain their TextField string label when the value is cleared programmatically. The issue starts to occur in version 14.1.0.
Test Page:
<ul>
<li><code>AutoCompleteValue</code>: @AutoCompleteValue</li>
<li><code>SelectedValue</code>: @SelectedValue</li>
<li><code>SelectedValueNullable</code>: @SelectedValueNullable</li>
<li><code>MultiSelectValues</code>: @string.Join(", ", MultiSelectValues)</li>
</ul>
<p>
<TelerikButton OnClick="@(() => {
AutoCompleteValue = string.Empty;
SelectedValue = default;
SelectedValueNullable = default;
MultiSelectValues = new();
})">Clear Values</TelerikButton>
</p>
<TelerikAutoComplete Data="@ListItems"
@bind-Value="@AutoCompleteValue"
ValueField="@nameof(ListItem.Text)"
Placeholder="Select Item"
ShowClearButton="true"
Width="300px" />
<br /><br />
<TelerikComboBox Data="@ListItems"
@bind-Value="@SelectedValue"
TextField="@nameof(ListItem.Text)"
ValueField="@nameof(ListItem.Id)"
Placeholder="Select Item"
ShowClearButton="true"
Width="300px" />
<TelerikComboBox Data="@ListItems"
@bind-Value="@SelectedValueNullable"
TextField="@nameof(ListItem.Text)"
ValueField="@nameof(ListItem.Id)"
Placeholder="Select Item"
ShowClearButton="true"
Width="300px" />
<br /><br />
<TelerikDropDownList Data="@ListItems"
@bind-Value="@SelectedValue"
TextField="@nameof(ListItem.Text)"
ValueField="@nameof(ListItem.Id)"
DefaultText="Select Item"
Width="300px" />
<TelerikDropDownList Data="@ListItems"
@bind-Value="@SelectedValueNullable"
TextField="@nameof(ListItem.Text)"
ValueField="@nameof(ListItem.Id)"
DefaultText="Select Item"
Width="300px" />
<br /><br />
<TelerikMultiColumnComboBox Data="@ListItems"
@bind-Value="@SelectedValue"
TextField="@nameof(ListItem.Text)"
ValueField="@nameof(ListItem.Id)"
Placeholder="Select Item"
ShowClearButton="true"
Width="300px">
<MultiColumnComboBoxColumns>
<MultiColumnComboBoxColumn Field="@nameof(ListItem.Id)" />
<MultiColumnComboBoxColumn Field="@nameof(ListItem.Text)" />
</MultiColumnComboBoxColumns>
</TelerikMultiColumnComboBox>
<TelerikMultiColumnComboBox Data="@ListItems"
@bind-Value="@SelectedValueNullable"
TextField="@nameof(ListItem.Text)"
ValueField="@nameof(ListItem.Id)"
Placeholder="Select Item"
ShowClearButton="true"
Width="300px">
<MultiColumnComboBoxColumns>
<MultiColumnComboBoxColumn Field="@nameof(ListItem.Id)" />
<MultiColumnComboBoxColumn Field="@nameof(ListItem.Text)" />
</MultiColumnComboBoxColumns>
</TelerikMultiColumnComboBox>
<br /><br />
<TelerikMultiSelect Data="@ListItems"
@bind-Value="@MultiSelectValues"
TextField="@nameof(ListItem.Text)"
ValueField="@nameof(ListItem.Id)"
Placeholder="Select Items"
ShowArrowButton="true"
ShowClearButton="true"
AutoClose="false"
Width="600px" />
@code {
private List<ListItem> ListItems { get; set; } = new();
private int SelectedValue { get; set; } = 3;
private int? SelectedValueNullable { get; set; } = 3;
private string AutoCompleteValue { get; set; } = "Item 3";
private List<int> MultiSelectValues { get; set; } = new() { 3, 5 };
protected override void OnInitialized()
{
ListItems = new List<ListItem>();
for (int i = 1; i <= 24; i++)
{
ListItems.Add(new ListItem()
{
Id = i,
Text = $"Item {i}"
});
}
base.OnInitialized();
}
public class ListItem
{
public int Id { get; set; }
public string Text { get; set; } = string.Empty;
}
}
The PDF Viewer may open certain files as empty, even though they have text and image content.
The issue occurs in version 14.0.0.
(Test file available in private ticket 1718294)
(bug report only)
(optional)
Provide additional information if the steps for reproducing the faulty behavior are not sufficient to describe the issue.
The FontFamily tool should keep its value when an unordered list is added/removed.
I am trying to look at the times 7pm - midnight. But if I set the end time to midnight, I get an error that the end time has to be greater than the start time. How do I set the timeline to show 7pm - midnight or 8pm - 2am?
I tried including the next date in the EndTime but the Scheduler does not take the date into consideration, it checks only the time portion.
The PDF Viewer may render parts of the contents as blank (empty space) and only form elements like checkboxes remain visible.
Test PDF file in ticket 1716925
My users use Tab to focus the masked textbox and when they start typing (its content was highlighted because of getting focus with Tab), that typing action does not put the range (caret) in the correct place - it remains at position 0 rather than going to position 1.
For example, in the below phone mask they type "9" and then "0" and I would expect to get "90" but I get "0".
---
ADMIN EDIT
A workaround is to collapse the range when the input gets focus:
@inject IJSRuntime JsInterop
<input />
<span @onfocusin="@CollapseInputSelection" @ref="@ParentElem">
<TelerikMaskedTextBox Mask="+1 (000) 000-0000"
IncludeLiterals="true"
@bind-Value="@CellPhoneNumber"
Class="form-control" />
</span>
@* move this script to an actual script file instead of using this hack *@
<script suppress-error="BL9992">
function collapseInputSelection(root) {
setTimeout(function () {
var input = root.querySelector("input");
if (input) {
input.setSelectionRange(0, 0);
}
}, 20);
}
</script>
@code{
string CellPhoneNumber { get; set; }
ElementReference ParentElem { get; set; }
async Task CollapseInputSelection()
{
await JsInterop.InvokeVoidAsync("collapseInputSelection", ParentElem);
}
}---