Web 2.0 WebComboBox runs code in default button twice

Xojo 2020r1.2 web 2.0 on Windows 10 in Chrome
I have a WebComboBox with NO events and an OK WebButton set as default and it has a Pressed event. If the focus is on the WebComboBox and I press enter then the code in the WebButton.pressed event is ran twice. Has anyone else seen this issue? Does anyone have suggestion for a workaround?

I noticed that issue with the popupmenu as well. My workaround is to have a boolean property on the container or page called Validate_Pressed (choose the name that suits you best). The property is false by default. Pressing the default button or other action button sets the property to true after all popupmenu values are processed and relevant code executed. I transferred everything to methods that are successively called in the button action method (itself called from the pressed event). A simple check for the boolean value in each method is then added. If false, go else exit. This is not the prettiest thing, but it effectively stopped everything executing twice.

hope it helps. LD

edit: corrected typo and added boolean check

Could one if you file a bug report?

Yep, I will file a bug report shortly.

I have a Feedback Case: 61510 where the WebButton fire twice but the focus is on the WebButton, so not exactly the same but maybe related?


I have added case 62566 to include the WebComboBox and the WebPopupMenu.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.