Project

General

Profile

Bug #5838

Error on empty WComboBox (on 3.3.7)

Added by José Luis Rey over 5 years ago. Updated over 5 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
-
Target version:
Start date:
07/28/2017
Due date:
% Done:

0%

Estimated time:

Description

Hello Team,

After updating to 3.3.7 some of our dialogs stops working, we discover that the problem comes when a WComboBox without any item is created, after 1 or 2 seconds after the WDialog's are created, this exception is throw to the console and javascript stops working.

Uncaught TypeError: Cannot read property ?wtd=8fSYjWyNQXYiyQQt&sid=--746676408&webGL=true&scrW=864&scrH=1536&tz=120&htmlHistory=true&deployPa...:1056 Uncaught TypeError: Cannot read property 'length' of null

at toUnicodeSelection (?wtd=8fSYjWyNQXYiyQQt&sid=--746676408&webGL=true&scrW=864&scrH=1536&tz=120&htmlHistory=true&deployPa...:1056)

at Object.window.Wt3_3_7.getUnicodeSelectionRange (?wtd=8fSYjWyNQXYiyQQt&sid=--746676408&webGL=true&scrW=864&scrH=1536&tz=120&htmlHistory=true&deployPa...:1072)

at encodeEvent (?wtd=8fSYjWyNQXYiyQQt&sid=--746676408&webGL=true&scrW=864&scrH=1536&tz=120&htmlHistory=true&deployPa...:2734)

at Object.update (?wtd=8fSYjWyNQXYiyQQt&sid=--746676408&webGL=true&scrW=864&scrH=1536&tz=120&htmlHistory=true&deployPa...:3204)

at HTMLSpanElement.f91 (eval at doJavaScript (?wtd=8fSYjWyNQXYiyQQt&sid=--746676408&webGL=true&scrW=864&scrH=1536&tz=120&htmlHistory=true&deployPa...:3064), :67:124)

at tm (?wtd=8fSYjWyNQXYiyQQt&sid=--746676408&webGL=true&scrW=864&scrH=1536&tz=120&htmlHistory=true&deployPa...:3481)


Files

issue_5838.cpp (1.01 KB) issue_5838.cpp Roel Standaert, 08/08/2017 04:11 PM
#1

Updated by Roel Standaert over 5 years ago

  • Status changed from New to Feedback

Could you test with the latest master or RC1 if you can? We're nearing the 3.3.8 release and much has changed and has been fixed since the release of 3.3.7.

I can't reproduce your issue, though. Not with the 3.3.7 release version, or with the latest master. If you can provide a (preferably standalone) code sample, that would be helpful.

Regards,

Roel

#2

Updated by José Luis Rey over 5 years ago

Hello,

I've updated to 3.3.8RC1, the issue still persist on the app:

Code snippet:

Wt::WDialog *dialog = new Wt::WDialog("TEST");

WComboBox* scanner_list = new WComboBox;

scanner_list->addItem("..."); // Removing this line cause the js exception

Wt::WContainerWidget* concenter = new WContainerWidget;

concenter->setContentAlignment(AlignCenter);

concenter->setPositionScheme(Absolute);

concenter->addWidget(new WText("TESTDIALOG"));

dialog~~contents()>addWidget(scanner_list);

dialog
contents()~~>addWidget(concenter);

dialog->exec();

#3

Updated by José Luis Rey over 5 years ago

Hello I forgot to add:

dialog->setWidth(400);

dialog->setHeight(480);

just before new Wt::WDialog

#4

Updated by Roel Standaert over 5 years ago

I checked it with that code, and I still can't reproduce your issue. Can you extend your code snippet to a full small application that displays this issue? See the attached source code for my attempt at reproducing it. The attached .cpp compiles and runs fine on my system with the latest master.

#5

Updated by José Luis Rey over 5 years ago

Hello Roel,

I've tested your code and you're right, I cannot reproduce the issue, I'm trying to find what cause the issue on our app (a js or whatever),

Kind regards

J

Also available in: Atom PDF