【web】修改当select标签过长时,弹框的内容不可见的问题

Signed-off-by: panliujun <panliujun3@h-partners.com>
This commit is contained in:
panliujun 2024-11-19 15:39:59 +08:00
parent 2404ebb59e
commit 457198ede1

View File

@ -63,7 +63,7 @@ void OptionLayoutAlgorithm::Measure(LayoutWrapper* layoutWrapper)
auto optionPaintProperty = optionNode->GetPaintProperty<OptionPaintProperty>();
if (optionPaintProperty && (optionPaintProperty->GetIdealWidthForWeb() > 0) &&
(idealWidth.value() < optionPaintProperty->GetIdealWidthForWeb())) {
idealSize.SetWidth(optionPaintProperty->GetIdealWidthForWeb());
idealSize.SetWidth(std::min(optionPaintProperty->GetIdealWidthForWeb(), layoutConstraint->maxSize.Width()));
} else {
idealSize.SetWidth(idealWidth.value());
}