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): prevent modal from closing when using scrollbar #3531

Merged

Conversation

maxokorokov
Copy link
Member

Have to use mousedown - mouseup - click to handle closing correctly:

Fixes #3518

@codecov-io
Copy link

codecov-io commented Jan 6, 2020

Codecov Report

Merging #3531 into master will increase coverage by 0.02%.
The diff coverage is 95.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3531      +/-   ##
==========================================
+ Coverage   91.39%   91.41%   +0.02%     
==========================================
  Files          96       96              
  Lines        2800     2807       +7     
  Branches      517      518       +1     
==========================================
+ Hits         2559     2566       +7     
  Misses        183      183              
  Partials       58       58
Flag Coverage Δ
#e2e 56.57% <95.45%> (+0.1%) ⬆️
#unit 88.16% <59.09%> (-0.08%) ⬇️
Impacted Files Coverage Δ
src/modal/modal-window.ts 93.02% <95.45%> (+1.35%) ⬆️

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 736953a...8bdb515. Read the comment docs.

Copy link
Contributor

@peterblazejewicz peterblazejewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
@maxokorokov thanks for addressing the problem!

src/modal/modal-window.ts Outdated Show resolved Hide resolved
@benouat
Copy link
Member

benouat commented Jan 7, 2020

@maxokorokov when CI is ok, let's merge it 🚀

@maxokorokov maxokorokov merged commit 7e5fac4 into ng-bootstrap:master Jan 7, 2020
maxokorokov added a commit that referenced this pull request Jan 7, 2020
Using `mousedown` - `mouseup` - `click` combination to handle closing correctly.

Fixes #3518
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modals dismissed by mouse release when trying to scroll the window
4 participants