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: dont use document.body as slider's popup container #28865

Merged
merged 2 commits into from
Jan 15, 2021

Conversation

rinick
Copy link
Contributor

@rinick rinick commented Jan 14, 2021

when getPopupContainer is not defined, it should rely on rc-tooltip's default behavior instead of forcing it to use document.body

[中文版模板 / Chinese template]

🤔 This is a ...

  • Bug fix

🔗 Related issue link

#28435

💡 Background and solution

The Slider component shows tooltip in document.body by default. That means when slider is in a different document, like popup window or iframe, tooltip will be shown in the wrong location.

Solution:
Since this is already handled properly by rc-trigger and rc-tooltip, we only need to make sure slider doesn't override the default getPopupContainer behavior

📝 Changelog

Language Changelog
🇺🇸 English Slider should not use document.body as default tooltip container, it should rely on rc-tooltip's default behavior
🇨🇳 Chinese Slider不应使用document.body作为默认的tooltip容器,应该留空让rc-tooltip默认机制决定

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

when getPopupContainer  is not defined, it should rely on rc-tooltip's default behavior instead of forcing it to use document.body
@rinick rinick changed the title dont use document.body as slider's popup container fix: dont use document.body as slider's popup container Jan 14, 2021
@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jan 14, 2021

@github-actions
Copy link
Contributor

github-actions bot commented Jan 14, 2021

Size Change: -13 B (0%)

Total Size: 788 kB

Filename Size Change
./dist/antd-with-locales.min.js 312 kB -6 B (0%)
./dist/antd.min.js 274 kB -7 B (0%)
ℹ️ View Unchanged
Filename Size Change
./dist/antd.compact.min.css 66.8 kB 0 B
./dist/antd.dark.min.css 68.1 kB 0 B
./dist/antd.min.css 66.9 kB 0 B

compressed-size-action

@afc163
Copy link
Member

afc163 commented Jan 14, 2021

图片

@codesandbox-ci
Copy link

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 4c94880:

Sandbox Source
antd reproduction template Configuration

@rinick
Copy link
Contributor Author

rinick commented Jan 14, 2021

@afc163 updated

@afc163 afc163 merged commit f931158 into ant-design:master Jan 15, 2021
@ycjcl868 ycjcl868 mentioned this pull request Jan 18, 2021
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.

3 participants