Project

General

Profile

Actions

Bug #11848

closed
AF MV

WSuggestionPopup fails when popup content is unfiltered

Bug #11848: WSuggestionPopup fails when popup content is unfiltered

Added by Andreas Frolov about 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
Start date:
07/25/2023
Due date:
% Done:

100%

Estimated time:

Description

This happens when the call to display comes from the server.

Application::Application(const Wt::WEnvironment& env)
  : Wt::WApplication(env)
{
  auto le = root()->addWidget(std::make_unique<Wt::WLineEdit>());
  auto button = root()->addWidget(std::make_unique<Wt::WPushButton>("Show popup"));

  Wt::WSuggestionPopup::Options simpleOptions;
  simpleOptions.highlightBeginTag = "<b>";
  simpleOptions.highlightEndTag = "</b>";
  simpleOptions.listSeparator = 0;

  auto popup = root()->addChild(std::make_unique<Wt::WSuggestionPopup>(simpleOptions));
  popup->addSuggestion("one");
  popup->setDropDownIconUnfiltered(true); // commenting out avoids the error
  popup->forEdit(le, Wt::PopupTrigger::Editing | Wt::PopupTrigger::DropDownIcon);

  button->clicked().connect([=]() { popup->showAt(le); });
}

MV Updated by Matthias Van Ceulebroeck about 3 years ago Actions #1

  • Status changed from New to InProgress
  • Assignee set to Matthias Van Ceulebroeck
  • Target version set to 4.10.1

Ah, there indeed is an uncovered case in the javascript, where the value would be undefined instead of null or empty.

MV Updated by Matthias Van Ceulebroeck about 3 years ago Actions #2

  • Status changed from InProgress to Review
  • Assignee deleted (Matthias Van Ceulebroeck)

MV Updated by Matthias Van Ceulebroeck about 3 years ago Actions #3

  • Status changed from Review to Implemented @Emweb
  • Assignee set to Matthias Van Ceulebroeck
  • % Done changed from 0 to 100

MV Updated by Matthias Van Ceulebroeck almost 3 years ago Actions #4

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: PDF Atom