Skip to content

Commit

Permalink
Fixed disabled SplitButton tabindex not correct
Browse files Browse the repository at this point in the history
Fix #1788
  • Loading branch information
enchev committed Nov 14, 2024
1 parent 22b5fc2 commit cbb292b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Radzen.Blazor/RadzenSplitButton.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@if (Visible)
{
<div @ref="@Element" style="@Style" @attributes="Attributes" class="@GetCssClass()" id="@GetId()"
tabindex="0" @onkeydown="@OnKeyPress" @onkeydown:preventDefault=preventKeyPress @onkeydown:stopPropagation>
tabindex="@(Disabled ? -1 : TabIndex)" @onkeydown="@OnKeyPress" @onkeydown:preventDefault=preventKeyPress @onkeydown:stopPropagation>
<button aria-label="@(ButtonAriaLabel ?? Text)" tabindex="-1" disabled="@IsDisabled" class="@getButtonCss()" type="button" @onclick="@OnClick">
<span class="rz-button-box">
@if (ButtonContent != null)
Expand Down
7 changes: 7 additions & 0 deletions Radzen.Blazor/RadzenSplitButton.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ private string getButtonSize()
[Parameter]
public string DropDownIcon { get; set; } = "arrow_drop_down";

/// <summary>
/// Gets or sets the index of the tab.
/// </summary>
/// <value>The index of the tab.</value>
[Parameter]
public int TabIndex { get; set; } = 0;

/// <summary>
/// Gets or sets the click callback.
/// </summary>
Expand Down

0 comments on commit cbb292b

Please sign in to comment.