-
-
Notifications
You must be signed in to change notification settings - Fork 50.8k
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 width out of screen #25765
fix: Modal width out of screen #25765
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 28ec6e3:
|
Can |
I don't think it will work with |
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.
the white-space
is still the problem. if i want to keep the modal width and write
<Modal overlayStyle={{ maxWidth: 'unset' }} width={998} />
. it will still jumps out of screen.
components/modal/style/modal.less
Outdated
@@ -96,7 +98,8 @@ | |||
padding: @modal-footer-padding-vertical @modal-footer-padding-horizontal; | |||
text-align: right; | |||
background: @modal-footer-bg; | |||
border-top: @modal-footer-border-width @modal-footer-border-style @modal-footer-border-color-split; | |||
border-top: @modal-footer-border-width @modal-footer-border-style |
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.
keep original style
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.
It should be formatted by prettier.
components/modal/style/modal.less
Outdated
@@ -81,7 +82,8 @@ | |||
padding: @modal-header-padding; | |||
color: @text-color; | |||
background: @modal-header-bg; | |||
border-bottom: @modal-header-border-width @modal-header-border-style @modal-header-border-color-split; | |||
border-bottom: @modal-header-border-width @modal-header-border-style |
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.
keep original style
Well, if we |
I mean in this case, the current implementation still not enough. You should set container's These fixes can be integrated. |
Codecov Report
@@ Coverage Diff @@
## master #25765 +/- ##
=======================================
Coverage 99.82% 99.82%
=======================================
Files 383 383
Lines 7343 7343
Branches 2054 2003 -51
=======================================
Hits 7330 7330
Misses 13 13 Continue to review full report at Codecov.
|
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
closes #25554
💡 Background and solution
When then
width
of thebrowser
is less than1000
and whenwidth
prop is added with a value of1000
, a scrollbar appears.Added
max-width
to the modal to fix the problem📝 Changelog
☑️ Self Check before Merge
View rendered components/modal/demo/width.md