Project

General

Profile

Bug #10995 » 0001-WT-10995-fix-WContainerWidget-s-wtEncodeValue-not-su.patch

Roel Standaert, 11/30/2022 04:37 PM

View differences:

ReleaseNotes.html
</li>
</ul>
<h2>Release 4.8.3 (December 2022)</h2>
<p>
Wt 4.8.3 is a patch release that addresses the following issues:
</p>
<ul>
<li>
<a href="https://redmine.webtoolkit.eu/issues/10995" target="_blank">Issue #10995</a>:
fixed an issue with <a href="classWt_1_1WContainerWidget.html">WContainerWidget</a>
where a session could terminate with the text "WContainerWidget: error parsing: undefined".
</li>
</ul>
<h2>Release 4.8.2 (November 4, 2022)</h2>
src/Wt/WContainerWidget.C
// enable form object to retrieve scroll state
setFormObject(true);
//declare javascript function Wt.encodeValue()
this->doJavaScript(this->jsRef()
+ ".wtEncodeValue = function() {"
+ "return " + this->jsRef() + ".scrollTop"
+ " + ';' + " + this->jsRef() + ".scrollLeft;"
+ "};");
setJavaScriptMember("wtEncodeValue",
"(self) => {"
"return `${self.scrollTop};${self.scrollLeft}`;"
"}");
flags_.reset(BIT_OVERFLOW_CHANGED);
......
scrollTop_ = (int)Utils::stod(attributes[0]);
scrollLeft_ = (int)Utils::stod(attributes[1]);
}catch (const std::exception& e) {
throw WException("WContainerWidget: error parsing: " + formData.values[0] + ": " + e.what());
} catch (const std::exception& e) {
LOG_ERROR("WContainerWidget " << id() << ": error parsing form data: '" << formData.values[0] <<
"', ignoring value, details: " << e.what());
}
} else
throw WException("WContainerWidget: error parsing: " + formData.values[0]);
} else {
LOG_ERROR("WContainerWidget " << id() << ": error parsing form data: '" << formData.values[0] <<
"', ignoring value");
}
}
}
}
(2-2/2)