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 #47967 modal rendering issue #48142

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mithun522
Copy link

  1. This is a Bug Fix which fixes Modal 内容超长,打开位置会闪一下 #47967
  2. Issue link https://github.com/ant-design/ant-design/issues/47967

Problem and Scenario.

  1. If the modal has a vey long content it gets stuck at the expected position and then moved to the top of the screen which is not expected.

Changes

  1. I have made the model size fixed and made it scrollable internally which make the modal to render in its actual expected postion.

Copy link

stackblitz bot commented Mar 28, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Contributor

github-actions bot commented Mar 28, 2024

Preview is ready

Copy link
Contributor

github-actions bot commented Mar 28, 2024

👁 Visual Regression Report for PR #48142 Passed ✅

🎯 Target branch: master (b0e4a3a)
📖 View Full Report ↗︎

🎊 Congrats! No visual-regression diff found.

Copy link

codesandbox-ci bot commented Mar 28, 2024

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.

@mithun522
Copy link
Author

Working Demo video attached.

Screen.Recording.2024-03-28.at.10.05.30.AM.1.mov

@@ -144,6 +144,13 @@ const Modal: React.FC<ModalProps> = (props) => {
maskTransitionName={getTransitionName(rootPrefixCls, 'fade', props.maskTransitionName)}
className={classNames(hashId, className, modal?.className)}
style={{ ...modal?.style, ...style }}
bodyStyle={{
Copy link
Contributor

Choose a reason for hiding this comment

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

Personally, I think this is not a good solution.

Copy link
Author

@mithun522 mithun522 Apr 14, 2024

Choose a reason for hiding this comment

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

Thank you for your review @yoyo837. I am just starting to contribute. Can you please suggest me a nice fix so that i can go through and implement my ideas and give a better solution.

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

Successfully merging this pull request may close these issues.

Modal 内容超长,打开位置会闪一下
2 participants