-
-
Notifications
You must be signed in to change notification settings - Fork 338
fix(modal): correct undetached positioning when large modal is used #1096
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): correct undetached positioning when large modal is used #1096
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this solution seems more robust.
…with detachable false This PR gives full control over the useFlex setting again. Some combinations are not working for correct positioning, which was basically fixed by #1079 and #1096 However, the fixes ignored a possible explicit given useFlex:true and always assumes auto instead (which makes sure the positioning will work all the time) As it turned out here there are some usecases, where people need the explicit setting of useFlex:true, i reverted the logic for the can.useFlex method but added some debug warnings instead when unsupported combinations occur, because the positioning for useFlex:true will not work when: - IE11 is used - detachable:false is used As the default of useFlex is auto, existing code should basically work as before without any visual issues
Description
This PR enhances the fix by @prudho and corrects positioning calculation when
detachable: false
was used together with large modals.This now works in any possible combination: detachable true/false, useFlex: true/false, top aligned, bottom aligned
Testcase
http://jsfiddle.net/5er1f3va/2/
Closes
#1079
#1138
Semantic-Org/Semantic-UI#4676