mui / mui/material-ui

[joy-ui][Modal] Is it expected for actions to be presented inverted?

Open
#42,185 7 comments 2 reactions 1 assignee View on GitHub

@siriwatknp is already working on this.

Since May 10, 2024.

on hold package: joy-ui scope: dialog
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Steps to reproduce

Link to live example: https://codesandbox.io/p/sandbox/lucid-tereshkova-hyfyys?file=%2Fsrc%2FDemo.tsx%3A44%2C52

Steps:

  1. Click in the button to open the modal
  2. Press Tab to navigate between the actions

Kooha-2024-05-09-19-59-37

Current behavior

The options are presented inverted relative to how they were defined in the code.

Expected behavior

I don't know if this is expected but pressing Tab should move the focus forward. For instance, with the focus in "Archive", the next focusable element is the "Discard notes" button. The Material Design modal behaves like that.

If it's a bug, I think it's just the case of aligning the buttons with justify-content: flex-end instead of flex-direction: row-reverse.

Context

No response

Your environment
npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: joy modal actions

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.