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

fix(Modal): select input not closing inside modal when clicking outside #4763

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

matthprost
Copy link
Collaborator

Summary

Type

  • Bug

Summarise concisely:

What is expected?

Select input doesn't close properly in a modal (like before) this is because of a change of behavior in select input. I fixed it by removing a stop propagation in modal and limit the close on click oustide pour nested modals. Only the modal in first plan will apply the click on outside.

I also added a use case in e2e tests so we cover this case better.

Relevant logs and/or screenshots

@matthprost matthprost added the bug Something isn't working label Feb 13, 2025
@matthprost matthprost requested a review from a team February 13, 2025 13:35
@matthprost matthprost self-assigned this Feb 13, 2025
@matthprost matthprost requested a review from lisalupi as a code owner February 13, 2025 13:35
@matthprost matthprost requested review from BABAK0T0 and Lawndlwd and removed request for a team February 13, 2025 13:35
Copy link

changeset-bot bot commented Feb 13, 2025

🦋 Changeset detected

Latest commit: 7ac96d4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@ultraviolet/ui Patch
@ultraviolet/form Patch
@ultraviolet/plus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.03%. Comparing base (5b840a8) to head (7ac96d4).
Report is 29 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4763      +/-   ##
==========================================
+ Coverage   89.01%   89.03%   +0.02%     
==========================================
  Files         229      229              
  Lines        7980     8005      +25     
  Branches     3627     3636       +9     
==========================================
+ Hits         7103     7127      +24     
- Misses        877      878       +1     
Files with missing lines Coverage Δ
...ages/ui/src/components/Modal/components/Dialog.tsx 75.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1cc1af...7ac96d4. Read the comment docs.

@matthprost matthprost changed the title ci(Modal): add one more test for modal with select input fix(Modal): select input not closing inside modal when clicking outside Feb 13, 2025
@matthprost matthprost merged commit 8413cad into main Feb 19, 2025
29 checks passed
@matthprost matthprost deleted the fix/hide-on-click-outside branch February 19, 2025 13:52
@scaleway-bot scaleway-bot mentioned this pull request Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants