Bug #5838
openError on empty WComboBox (on 3.3.7)
0%
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
Updated by Roel Standaert over 7 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
Updated by José Luis Rey over 7 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);contents()~~>addWidget(concenter);
dialog
dialog->exec();
Updated by José Luis Rey over 7 years ago
Hello I forgot to add:
dialog->setWidth(400);
dialog->setHeight(480);
just before new Wt::WDialog
Updated by Roel Standaert over 7 years ago
- File issue_5838.cpp issue_5838.cpp added
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.
Updated by José Luis Rey over 7 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