Skip to content

Commit

Permalink
[@mantine/dates] Calendar: Fix incorrect focus logic when first item …
Browse files Browse the repository at this point in the history
…is disabled (#5078)
  • Loading branch information
teh23 authored Oct 20, 2023
1 parent 77635df commit 05e26d7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export const CalendarHeader = factory<CalendarHeaderFactory>((_props, ref) => {
onMouseDown={preventFocus}
disabled={previousDisabled}
data-disabled={previousDisabled || undefined}
tabIndex={__preventFocus ? -1 : 0}
tabIndex={__preventFocus || previousDisabled ? -1 : 0}
data-mantine-stop-propagation={__stopPropagation || undefined}
>
{previousIcon || (
Expand Down Expand Up @@ -205,7 +205,7 @@ export const CalendarHeader = factory<CalendarHeaderFactory>((_props, ref) => {
onMouseDown={preventFocus}
disabled={nextDisabled}
data-disabled={nextDisabled || undefined}
tabIndex={__preventFocus ? -1 : 0}
tabIndex={__preventFocus || nextDisabled ? -1 : 0}
data-mantine-stop-propagation={__stopPropagation || undefined}
>
{nextIcon || (
Expand Down

0 comments on commit 05e26d7

Please sign in to comment.