Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog: ignores focusOnShow={false} when showHeader={false} #6825

Closed
adrianhurt opened this issue Jul 3, 2024 · 0 comments · Fixed by #6899, leoo1992/GeradorQRCode#80 or leoo1992/GeradorQRCode#85 · May be fixed by mtech-31-quemistry/quemistry_client_web#20
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@adrianhurt
Copy link

Describe the bug

When a Dialog has the prop showHeader to false, the focusOnShow is ignored when is set to false, so it will always be focused. This is specially annoying for the case that the first input is a Calendar, because it is focused even before showing the Dialog, so the Calendar's overlay is placed behind the Dialog on the top-left corner. It can be seen on the reproducer

<Dialog
    showHeader={false}
    focusOnShow={false}
    ...
>
    <Calendar value={date} onChange={(e) => setDate(e.value)} />
</Dialog>

Reproducer

https://stackblitz.com/edit/pys2ri?file=src%2FApp.jsx

PrimeReact version

latest

React version

18.x

Language

ES6

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

It should not auto-focus the first input when showOnFocus={false}.

@adrianhurt adrianhurt added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 3, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jul 3, 2024
@melloware melloware added this to the 10.7.1 milestone Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment