Steps to reproduce
Reproducible with UI for Blazor, as well as UI for ASP.NET Core (PDF.js and DPL processing)
Actual Behavior
The content is visualized distorted, large parts of it are missing, layout is messed up.
Expected Behavior
The document content is visualized properly, as it is with: https://mozilla.github.io/pdf.js/web/viewer.html
(bug report only)
1. Run this example: https://blazorrepl.telerik.com/cUaBGOOZ34pkp6wB57
2. Inspect the MultiSelect’s input.
3. Click within the component’s input area, to open its popup.
(optional)
When the dropdown opens, an aria-controls attribute is applied to the MultiSelect’s input. Its value does not match any existing DOM element.
The value of the aria-controls attribute should point at an existing element (e.g., the popup’s list element: https://www.telerik.com/blazor-ui/documentation/components/multiselect/accessibility/wai-aria-support#multiselect-wrapping-element ). But in this case the MultiSelect is not bound to data and a list element is not rendered in the popup.
The NumericTextBox does not render the new Value that is set in ValueChanged if this new value is different than the event argument. Instead, the component clears the textbox, even though the component Value parameter is correct.
https://blazorrepl.telerik.com/wzaAHYas221go9xd48
The problem occurs only if there is an existing value and the user removes it with Backspace.
Window, Dialog, and other popups render as children of TelerikRootComponent, which makes CSS Isolation difficult. Current strategy says to use containment selector or global scope css styles.
To allow CSS isolation to pass through, I'd like to see an additional "CssScope" attribute. For example:
<TelerikWindow CssScope="my-custom-scope">
</TelerikWindow>Then when the window is rendered:
<div ... my-custom-scope>
....
</div>
Could you include the OnHide event in the TelerikPopover, similar to the Popup component? The Popover already hides on outside clicks, but we have no method to programatically react to it, for example to reset input values and treat it as a cancellation.
===
TELERIK EDIT: In the meantime, a possible workaround is to detect clicks outside the Popover with JavaScript:
https://blazorrepl.telerik.com/QKOBbSbF25rgdsgP20
@implements IAsyncDisposable
@inject IJSRuntime JS
<TelerikPopover @ref="@PopoverRef"
AnchorSelector=".popover-target"
ShowOn="@PopoverShowOn.Click"
Position="@PopoverPosition.Right"
Offset="20"
Class="my-popover">
<PopoverContent>
Telerik Popover for Blazor
</PopoverContent>
</TelerikPopover>
<p>Popover Hide Log: @PopoverOnHideLog</p>
<TelerikButton Class="popover-target" OnClick="ShowPopover">
Show Popover
</TelerikButton>
<script suppress-error="BL9992">
var dotnetRef;
window.registerOutsideClick = function (dotnetHelper) {
dotnetRef = dotnetHelper;
document.addEventListener("click", onPopoverOutsideClick);
};
window.unregisterOutsideClick = function () {
dotnetRef = null;
document.removeEventListener("click", onPopoverOutsideClick);
};
function onPopoverOutsideClick(e) {
window.setTimeout(() => {
const popover = document.querySelector(".my-popover");
const anchor = document.querySelector(".popover-target");
const clickedInsidePopover = popover?.contains(e.target);
const clickedAnchor = anchor?.contains(e.target);
if (!clickedInsidePopover && !clickedAnchor) {
dotnetRef?.invokeMethodAsync("OnPopoverHide");
}
}, 100);
}
</script>
@code {
#nullable enable
private DotNetObjectReference<__Main>? DotNetRef { get; set; }
private TelerikPopover? PopoverRef;
private string PopoverOnHideLog { get; set; } = string.Empty;
private void ShowPopover()
{
PopoverRef?.Show();
}
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await JS.InvokeVoidAsync("registerOutsideClick", DotNetRef);
}
}
protected override void OnInitialized()
{
DotNetRef = DotNetObjectReference.Create(this);
}
[JSInvokable]
public void OnPopoverHide()
{
PopoverOnHideLog = $"Popover closed automatically at {DateTime.Now.ToString("HH:mm:ss")}";
StateHasChanged();
}
public async ValueTask DisposeAsync()
{
if (DotNetRef != null)
{
DotNetRef.Dispose();
}
await JS.InvokeVoidAsync("unregisterOutsideClick");
}
}
Currently the Telerik TextArea for Blazor stops propagation for the keyDown event for Enter key presses and the app cannot detect them with @onkeydown on the component's parent container. A possible workaround is to use @onkeyup.
This request is about some built-in configuration or event that allows the app to detect Enter key presses. The goal is to distinguish such user actions in scenarios where Shift+Enter creates new lines, while Enter triggers a custom action like submit.
I have been having issues adding the month view to a Telerik Blazor scheduler component, when there is grouping. It gives a null reference error any time I try to switch to the month view. I also tried it using the available demo for grouping in Telerik REPL, the only difference I found between my code and the demo was that I had used the ItemsPerSlot parameter. I added this to the demo, and was able to reproduce the error I was seeing, and I have attached the console output from the REPL demo. I believe there is either a bug with the ItemsPerSlot being used in conjunction with grouping on a scheduler component, or some instruction missing from how to set it up properly to prevent this null reference issue.
Changed code:
<SchedulerMonthView ItemsPerSlot="5"></SchedulerMonthView>
Demo used:
Blazor Scheduler (Event Calendar) Demos - Grouping | Telerik UI for Blazor
The Grid resets and disables the adaptive mode for a column menu if the column has been hidden. The component also uses the previous adaptive mode that is no longer correct if the browser window is resized.
Steps to reproduce:
Test page:
<TelerikGrid Data="@GridData"
AdaptiveMode="@AdaptiveMode.Auto"
FilterMode="GridFilterMode.FilterMenu"
ShowColumnMenu="true">
<GridColumns>
<GridColumn Field="@nameof(Product.Name)" />
<GridColumn Field="@nameof(Product.Group)" />
<GridColumn Field="@nameof(Product.Price)" DisplayFormat="{0:c2}" />
<GridColumn Field="@nameof(Product.Quantity)" DisplayFormat="{0:n0}" />
<GridColumn Field="@nameof(Product.Released)" DisplayFormat="{0:d}" />
<GridColumn Field="@nameof(Product.Discontinued)" />
</GridColumns>
</TelerikGrid>
@code {
private List<Product> GridData { get; set; } = new();
protected override void OnInitialized()
{
var rnd = Random.Shared;
for (int i = 1; i <= 3; i++)
{
GridData.Add(new Product()
{
Id = i,
Name = $"Name {i} {(char)rnd.Next(65, 91)}{(char)rnd.Next(65, 91)}",
Group = $"Group {i % 3 + 1}",
Price = rnd.Next(1, 100) * 1.23m,
Quantity = rnd.Next(0, 10000),
Released = DateTime.Today.AddDays(-rnd.Next(60, 1000)),
Discontinued = i % 4 == 0
});
}
}
public class Product
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Group { get; set; } = string.Empty;
public decimal Price { get; set; }
public int Quantity { get; set; }
public DateTime Released { get; set; }
public bool Discontinued { get; set; }
}
}
Customers report inconsistent in-cell editing behavior with DatePicker columns in the Grid.
Here is a REPL test page that reproduces the issue (first date column) and provides a workaround (second date column):
https://blazorrepl.telerik.com/QAErkrEh090ykIxR16
The workaround relies on Grid EditorTemplate, the DatePicker OnClose event, and programmatic Grid edit mode management. The relevant code is:
@using System.ComponentModel.DataAnnotations
<TelerikGrid @ref="@GridRef"
Data="@GridData"
EditMode="@GridEditMode.Incell"
OnUpdate="@OnGridUpdate"
OnCreate="@OnGridCreate">
<GridToolBarTemplate>
<GridCommandButton Command="Add">Add Item</GridCommandButton>
</GridToolBarTemplate>
<GridColumns>
<GridColumn Field="@nameof(Product.Name)" />
<GridColumn Field="@nameof(Product.StartDate)" Title="BUG" DisplayFormat="{0:d}" />
<GridColumn Field="@nameof(Product.EndDate)" Title="WORKAROUND" DisplayFormat="{0:d}">
<EditorTemplate>
@{ var editItem = (Product)context; }
<TelerikDatePicker Value="editItem.EndDate"
ValueChanged="@((DateTime? newValue) => OnGridDatePickerValueChanged(newValue, editItem))"
ValueExpression="@( () => editItem.EndDate )"
OnClose="@(async () => await OnGridDatePickerClose(editItem))" />
</EditorTemplate>
</GridColumn>
</GridColumns>
</TelerikGrid>
@code {
#nullable enable
private TelerikGrid<Product>? GridRef;
private List<Product> GridData { get; set; } = new();
private int LastId { get; set; }
private DateTime LastDatePickerValueChanged { get; set; } = DateTime.Now;
private void OnGridDatePickerValueChanged(DateTime? newValue, Product editItem)
{
editItem.EndDate = newValue;
LastDatePickerValueChanged = DateTime.Now;
}
private async Task OnGridDatePickerClose(Product editItem)
{
if (DateTime.Now - LastDatePickerValueChanged > TimeSpan.FromMilliseconds(500))
{
GridState<Product> gridState = GridRef!.GetState();
if (gridState.EditItem is not null && gridState.EditItem.Id == editItem.Id)
{
// Uncomment to perform an item update instead of cancel
// OnGridUpdate(new GridCommandEventArgs { Item = editItem });
gridState.OriginalEditItem = null!;
gridState.EditItem = null!;
await GridRef.SetStateAsync(gridState);
}
}
}
private void OnGridCreate(GridCommandEventArgs args)
{
var createdItem = (Product)args.Item;
createdItem.Id = ++LastId;
GridData.Insert(0, createdItem);
}
private void OnGridUpdate(GridCommandEventArgs args)
{
var updatedItem = (Product)args.Item;
var originalItemIndex = GridData.FindIndex(i => i.Id == updatedItem.Id);
if (originalItemIndex != -1)
{
GridData[originalItemIndex] = updatedItem;
}
}
protected override void OnInitialized()
{
for (int i = 1; i <= 5; i++)
{
GridData.Add(new Product()
{
Id = ++LastId,
Name = $"Product {LastId}",
Price = Random.Shared.Next(0, 100) * 1.23m,
Quantity = Random.Shared.Next(0, 1000),
StartDate = DateTime.Today.AddDays(-Random.Shared.Next(60, 1000)),
EndDate = DateTime.Today.AddDays(Random.Shared.Next(1, 60)),
IsActive = LastId % 4 > 0
});
}
}
public class Product
{
public int Id { get; set; }
[Required]
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
public int Quantity { get; set; }
public DateTime? StartDate { get; set; }
public DateTime? EndDate { get; set; }
public bool IsActive { get; set; }
}
}
The Telerik UI for Blazor TimePicker currently does not appear to expose an equivalent to the Kendo UI for jQuery TimePicker "focusTime" option.
https://github.com/telerik/kendo-ui-core/blob/master/docs/api/javascript/ui/timepicker.md#focustime-datedefault-null
In Kendo UI for jQuery, focusTime allows the popup to open with a specific time focused without actually setting the selected value. This is useful when the picker has no value yet.
For example, let's say we want the time-picker to open up with the placeholder value of 08:00, how would we achieve this in Telerik UI for Blazor? Currently it defaults the placeholder to the current time.
Thanks
If the element of the tooltip is on top of the screen (almost outside of the viewport), hovering the remaining part of the element makes the tooltip create a flashing effect.
Please watch the attached video.
When I place a tooltip on drawer item, it just flickers randomly
![[video-to-gif output image]](https://im3.ezgif.com/tmp/ezgif-3-4372cd0f87.gif)
https://blazorrepl.telerik.com/wQbbmbGb05hzznPh45
(bug report only)
Reproducible in the demos: https://demos.telerik.com/blazor-ui/dropdowntree/overview
(optional)
For a brief moment the filter input in the dropdown appears focused, but then the focus moves to the first item in the list. If the user clicks the “down arrow” icon to open the dropdown, the filter input is focused as expected.
The filter input is focused regardless where in the component the user clicks.
(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.
(bug report only)
1. Run this example: https://blazorrepl.telerik.com/cAkKcTYZ39RLN4r548
2. Open the ComboBox popup and navigate through the items in the list by holding down “Down Arrow” key, or by pressing the key rapidly.
(optional)
An exception is thrown and instead of continuing with the next batch of items, navigation is stuck on the first item in the list.
Navigation continues from the next loaded batch of items.
I am resetting the Grid State by calling Grid.SetState(null). This doesn't reset ColumnState<T>.Locked boolean to false and the columns remain locked.
---
ADMIN EDIT
---
A possible workaround for the time being is to additionally loop through the ColumnStates collection of the State and set the Locked property to false for each column.