mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-13 03:32:13 +00:00
chore: removing tabindex from modal
This commit is contained in:
parent
ebcdf1af7a
commit
aaa94a43bb
1 changed files with 2 additions and 7 deletions
|
@ -24,7 +24,6 @@ export function Modal({
|
|||
}: ModalProps) {
|
||||
const [isClosing, setIsClosing] = useState(false);
|
||||
const modalContentRef = useRef<HTMLDivElement | null>(null);
|
||||
const titleRef = useRef<HTMLHeadingElement | null>(null);
|
||||
|
||||
const { t } = useTranslation("modal");
|
||||
|
||||
|
@ -53,8 +52,6 @@ export function Modal({
|
|||
|
||||
useEffect(() => {
|
||||
if (visible) {
|
||||
if (titleRef.current) titleRef.current.focus();
|
||||
|
||||
const onKeyDown = (e: KeyboardEvent) => {
|
||||
if (e.key === "Escape" && isTopMostModal()) {
|
||||
handleCloseClick();
|
||||
|
@ -99,10 +96,8 @@ export function Modal({
|
|||
>
|
||||
<div className={styles.modalHeader}>
|
||||
<div style={{ display: "flex", gap: 4, flexDirection: "column" }}>
|
||||
<h3 ref={titleRef} tabIndex={0}>
|
||||
{title}
|
||||
</h3>
|
||||
{description && <p tabIndex={0}>{description}</p>}
|
||||
<h3>{title}</h3>
|
||||
{description && <p>{description}</p>}
|
||||
</div>
|
||||
|
||||
<button
|
||||
|
|
Loading…
Reference in a new issue