Project

General

Profile

Bug #9076

Opening popup (calendar) of Wt::WDateEdit fails in Widgetset mode on first render.

Added by Dries Mys 2 months ago. Updated 2 months ago.

Status:
InProgress
Priority:
Normal
Assignee:
Target version:
Start date:
09/17/2021
Due date:
% Done:

0%

Estimated time:

Description

Consider the following example:

A simple WidgetSet application with a single Wt::WDateEdit (and a Wt::WPushButton)

std::unique_ptr<Wt::WContainerWidget> pWidget = std::make_unique<Wt::WContainerWidget>();
auto pRoot = pWidget.get();
bindWidget(std::move(pWidget), "WidgetHolder");

pRoot->addNew<Wt::WDateEdit>();
pRoot->addNew<Wt::WPushButton>("Fix WDateEdit")->clicked().connect([](){});

When the user clicks on the calendar icon to open the calendar popup, a JS error occurs inside WDateEdit.js

 p is undefined

indicating that the popup does not exist yet (Wt::WPopupWidget::render is not yet called).

After a new round trip (js update) to the server, for example by clicking on the Wt::WPushButton, the issue is resolved.

Note that the problem does not occur for an Application entry point.

#1

Updated by Korneel Dumon 2 months ago

  • Status changed from New to InProgress
  • Assignee set to Korneel Dumon
  • Target version set to 4.7.0

Also available in: Atom PDF