diff --git a/frameworks/core/components_ng/pattern/overlay/sheet_presentation_layout_algorithm.cpp b/frameworks/core/components_ng/pattern/overlay/sheet_presentation_layout_algorithm.cpp index 0b7189cfc98e711669c667f2917fbfdcf032dd37..2539fdf5685261c0ea302ceff478cbb29e450720 100755 --- a/frameworks/core/components_ng/pattern/overlay/sheet_presentation_layout_algorithm.cpp +++ b/frameworks/core/components_ng/pattern/overlay/sheet_presentation_layout_algorithm.cpp @@ -96,7 +96,8 @@ void SheetPresentationLayoutAlgorithm::Measure(LayoutWrapper* layoutWrapper) } else { width = sheetStyle_.width->ConvertToPx(); } - if (width > maxSize.Width() || width < 0.0f) { + // set width to sheetWidth if width is over limit + if (width > maxSize.Width() || width <= 0.0f) { width = sheetWidth_; } sheetWidth_ = width;