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

OWA-102: fix modal closing behavior #649

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

mirovladimitrovski
Copy link
Collaborator

@mirovladimitrovski mirovladimitrovski commented Nov 20, 2024

Description

When the modal is open, clicking and holding the mouse button down on any element and then moving the cursor to the overlay to release the mouse button causes the modal to close. This behavior is unintended. The modal should only close if the initial mousedown event originated on the overlay itself.

Acceptance Criteria

Correct Close Behavior

The modal closes only when the initial mousedown event starts on the overlay and the mouseup event is completed on the overlay.

Prevent Unintended Close

If the mousedown event begins on any interactive or non-overlay element within the modal and the cursor is dragged to the overlay before releasing, the modal should not close.

Interaction on Modal Content

All interactions within modal elements (e.g., buttons, text fields, dropdowns) are unaffected, and the modal remains open regardless of cursor movement or mouse button release outside these elements.

Overlay-Specific Closing

The overlay retains its intended functionality: Clicking directly on the overlay (both mousedown and mouseup) closes the modal.

This PR solves OWA-102

Steps completed:

According to our definition of done, I have completed the following steps:

  • Acceptance criteria met
  • Unit tests added
  • Docs updated (including config and env variables)
  • Translations added
  • UX tested
  • Browsers / platforms tested
  • Rebased & ready to merge without conflicts
  • Reviewed own code

Copy link

Visit the preview URL for this PR (updated for commit 340d43a):

https://ottwebapp--pr649-owa-102-fix-modal-cl-6uoxcu6u.web.app

(expires Fri, 20 Dec 2024 11:25:59 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c198f8a3a199ba8747819f7f1e45cf602b777529

@mirovladimitrovski mirovladimitrovski merged commit b65f0c5 into develop Nov 20, 2024
10 checks passed
@mirovladimitrovski mirovladimitrovski deleted the OWA-102/fix-modal-closing-behavior branch November 20, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants