Project

General

Profile

Actions

Bug #11848

closed

WSuggestionPopup fails when popup content is unfiltered

Added by Andreas Frolov over 1 year ago. Updated over 1 year 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); });
}
Actions #1

Updated by Matthias Van Ceulebroeck over 1 year ago

  • 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.

Actions #2

Updated by Matthias Van Ceulebroeck over 1 year ago

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

Updated by Matthias Van Ceulebroeck over 1 year ago

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

Updated by Matthias Van Ceulebroeck over 1 year ago

  • Status changed from Implemented @Emweb to Closed
Actions

Also available in: Atom PDF