Open SunGuoQiang123 opened 5 years ago
I take a look the source code, I find out the tooltip component actually using the popper.js to handle the placement, offset, and arrowOffset. Maybe it is a bug of popper.js.
@lastingman ok
@SunGuoQiang123 Set position as relative can resolve this
body {
position: relative;
}
@SunGuoQiang123 Set position as relative can resolve this
body { position: relative; }
or
.el-tooltip__popper {
word-break: break-all;
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Set tooltip max-width not more than viewport width, e.g., .el-tooltip__popper { max-width: 90vw; }
Element UI version
2.11.1
OS/Browsers version
macOS 10.13.6 / chrome 79.0.3928.4
Vue version
2.6.10
Reproduction Link
https://jsfiddle.net/1a6t47Lb/7/
Steps to reproduce
move mouse over the 'show tooltip' which has the style 'text-align:right' div the tooltip show but its position style is 'left: -12px' cause the tooltip content oversize the screen width. the same issue happened when the table column add show-overflow-tooltip property
What is Expected?
the tooltip should show all content and not oversize the screen width
What is actually happening?
the tooltip content oversize the screen width and its style "left: -12px"