Project

General

Profile

Actions

Bug #3748

closed

Transient WPopupWidget does not appear at the first show() call

Added by Alan Finley almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
01/30/2015
Due date:
% Done:

0%

Estimated time:

Description

I want to create a popup widget which appears after a button click.

Here's my code:

#include <Wt/WPopupWidget>
#include <Wt/WText>
#include <Wt/WPushButton>

Wt::WApplication* createApplication(const Wt::WEnvironment& env)
{
    Wt::WApplication *app = new Wt::WApplication(env);

    Wt::WPushButton *btn = new Wt::WPushButton("click", app->root());

    Wt::WPopupWidget *popup = new Wt::WPopupWidget(new Wt::WText("popup"), app);
    popup->setTransient(true);
    popup->setAnchorWidget(btn);

    btn->clicked().connect(popup, &Wt::WPopupWidget::show);

    return app;
}

The problem is that the popup does not appear on the first button click when the transient option set to true: popup->setTransient(true). All further clicks are processed fine.

Also I've noticed that the popup html element gets proper absolute position after the first click, but that click does not change its 'display: none' css rule.

Actions #1

Updated by Alan Finley almost 10 years ago

I use Wt 3.3.1

Actions #2

Updated by Koen Deforche over 9 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
Actions #3

Updated by Koen Deforche over 9 years ago

  • Status changed from InProgress to Resolved
  • Target version set to 3.3.3

Hey,

I tried with the current git version and this problem has already been fixed. I would imagine that this has been fixed already in earlier versions of Wt, such as 3.3.2 or 3.3.3.

Koen

Actions #4

Updated by Koen Deforche over 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF