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): ignore accidental backdrop clicks #3457

Merged

Conversation

maxokorokov
Copy link
Member

This uses a combination of 'mousedown/up' events instead of 'click'.
Aligns behavior with bootstrap and helps with closing modal accidentally (ex. when selecting text)

Some tests had to be converted to e2e

Closes #3415
Fixes #1950

This uses a combination of 'mousedown/up' events instead of 'click'.
This aligns behavior with bootstrap and helps with closing modal accidentally (ex. when selecting text)

Some tests had to be converted to e2e

Closes ng-bootstrap#3384
Fixes ng-bootstrap#1950
@codecov-io
Copy link

Codecov Report

Merging #3457 into master will decrease coverage by 0.06%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3457      +/-   ##
==========================================
- Coverage   91.18%   91.12%   -0.07%     
==========================================
  Files          95       95              
  Lines        2790     2793       +3     
  Branches      517      516       -1     
==========================================
+ Hits         2544     2545       +1     
- Misses        189      190       +1     
- Partials       57       58       +1
Flag Coverage Δ
#e2e 55.81% <100%> (+0.22%) ⬆️
#unit 87.99% <40%> (-0.35%) ⬇️
Impacted Files Coverage Δ
src/modal/modal-window.ts 91.66% <100%> (-5.31%) ⬇️

Continue to review full report at Codecov.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants