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

Calendar: TouchUI dismissal issues #3111

Closed
HillaryManning opened this issue Jul 27, 2022 · 1 comment · Fixed by #3113
Closed

Calendar: TouchUI dismissal issues #3111

HillaryManning opened this issue Jul 27, 2022 · 1 comment · Fixed by #3113
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@HillaryManning
Copy link

Describe the bug

The Calendar component with TouchUI enabled cannot be dismissed unless a date selection is made. Clicking the background will hide the modal-overlay, but not dismiss the calendar. (Trying the 'esc' key also led to odd behavior, but is less pressing since this is a touch-centric flag).

(Bug was consistent in both React 17.0.2 and 18.2.0, and on desktop Chrome + Safari, and Chrome on Android)

This behavior can be observed on the Prime React website (just click on the TouchUI example)
https://www.primefaces.org/primereact/calendar/

Reproducer

https://codesandbox.io/s/primereact-test-forked-xeykxy?file=/src/index.js

PrimeReact version

8.3.0

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. Go to: https://codesandbox.io/s/primereact-test-forked-xeykxy?file=/src/index.js

  2. Select the calendar input

    2.0.1 Try to exit the calendar by clicking the background.
    2.0.2 Observe the modal overlay/mask is removed, but the calendar remains active.

    ALTERNATIVELY:

    2.1.1 Try to exit the calendar by hitting the escape key.
    2.1.2 Observe the calendar is removed, but the modal overlay/mask remains.

Expected behavior

The calendar can be exited without making a date selection. Clicking the background (or hitting the escape key) will hide both the calendar and the modal-overlay.

@HillaryManning HillaryManning added Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: Bug Issue contains a defect related to a specific component. labels Jul 27, 2022
@melloware melloware added 👍 confirmed 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 27, 2022
melloware added a commit to melloware/primereact that referenced this issue Jul 27, 2022
@melloware melloware self-assigned this Jul 27, 2022
@melloware melloware added this to the 9.0.0 milestone Jul 27, 2022
@melloware
Copy link
Member

Thanks for reporting I have submitted a fix for both issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants