From 3b77e5e855b761d281f588cf4fb1c50e02f7c0a8 Mon Sep 17 00:00:00 2001
From: Roel Standaert
Date: Thu, 12 Jan 2023 11:54:35 +0100
Subject: [PATCH] WT-11240: fix rendered state of widgets when returning from
suspend
Widgets would believe they were already rendered when unsuspending,
causing issues e.g. when a WTextEdit was placed inside of a WTemplate.
The fix is to call setRendered(false) on the domRoot(), just like it is
done when reloadIsNewSession() is false, or JS is not available.
---
ReleaseNotes.html | 10 ++++++++++
src/web/WebSession.C | 1 +
2 files changed, 11 insertions(+)
diff --git a/ReleaseNotes.html b/ReleaseNotes.html
index 6b7dfa3a0..47dd9af70 100644
--- a/ReleaseNotes.html
+++ b/ReleaseNotes.html
@@ -27,6 +27,16 @@ behaviour.
+ -
+ Issue #11230:
+ fixed an issue with
+ WApplication::suspend()
+ where widgets would incorrectly believe they were still
+ rendered when unsuspending.
+ This would cause problems with e.g. WTextEdit
+ inside of a
+ WTemplate.
+
-
Issue #11240:
fixed an issue where the lazy loading logic breaks when removing and inserting a large
diff --git a/src/web/WebSession.C b/src/web/WebSession.C
index d16306bc8..13a9f0c5e 100644
--- a/src/web/WebSession.C
+++ b/src/web/WebSession.C
@@ -2616,6 +2616,7 @@ void WebSession::notify(const WEvent& event)
&& handler.response()->responseType() ==
WebResponse::ResponseType::Page
&& (!env_->ajax() ||
+ suspended() ||
!controller_->configuration().reloadIsNewSession())) {
app_->domRoot()->setRendered(false);
--
2.34.1