-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Type: BugIssue contains a defect related to a specific component.Issue contains a defect related to a specific component.
Milestone
Description
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}
.
KumJungMin
Metadata
Metadata
Assignees
Labels
Type: BugIssue contains a defect related to a specific component.Issue contains a defect related to a specific component.