From c0ffeca6ac13769f54d7df5c5eb214963fe40682 Mon Sep 17 00:00:00 2001 From: Ali Tavakoli Date: Mon, 24 Feb 2025 22:24:07 +0330 Subject: [PATCH] Fix: The value assigned to the float property is the opposite To specify the float value, the page orientation is taken into account, so if the page orientation is set to RTL, the value assigned to the float property will be the opposite, while float:left and float:right operate independently of the page orientation. --- src/Wt/WWebWidget.C | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Wt/WWebWidget.C b/src/Wt/WWebWidget.C index 407b98fe6..a1806948a 100644 --- a/src/Wt/WWebWidget.C +++ b/src/Wt/WWebWidget.C @@ -1544,13 +1544,12 @@ void WWebWidget::updateDom(DomElement& element, bool all) */ if (!app) app = WApplication::instance(); - bool ltr = app->layoutDirection() == LayoutDirection::LeftToRight; switch (layoutImpl_->floatSide_) { case Side::Left: - element.setProperty(Property::StyleFloat, ltr ? "left" : "right"); + element.setProperty(Property::StyleFloat, "left"); break; case Side::Right: - element.setProperty(Property::StyleFloat, ltr ? "right" : "left"); + element.setProperty(Property::StyleFloat, "right"); break; default: /* illegal values */