Skip to content

Some ToolbarButton click events fires twice #756

Description

@itg-assistant

redcard asked 2017-04-06 15:37:39 UTC

Hello, I have been working on this bug for several days now.

We use many toolbars in our website (currently converting from VWG to WiseJ) that contain various toolbar buttons.  Some of them fire the click event twice, every time.  This is bad because it causes dialog boxes to get displayed twice, etc.

If it happens with any button on the toolbar, then it happens with all buttons on the toolbar.

This only occurs with roughly half of the toolbars in our system.  There is no difference in the instantiation or setup of broken toolbars and properly-functioning toolbars (that I can find.)

I cannot recreate the bug in a sample application.

This morning I downloaded the WiseJ source (1.3.47.0) and have been stepping through the code, adding conditional breakpoints for affected toolbar buttons (that fire twice.)  The Click event is only wired once (ToolBarButton.cs, line 76) but the OnClick(EventArgs e) function is hit twice.  The JSON that causes this to occur is (from HttpHandler.ProcessHttpAppRequest(context), line 164):
{"events":[{"id":"id_9835","type":"buttonClick","args":{"Button":"id_9624"}},{"id":"id_9835","type":"buttonClick","args":{"Button":"id_9624"}}],"type":2,"sid":"f9be3c02-2c0a-480c-914b-d32904207fa2"}

As you can see, the buttonClick event is fired twice, even though the Click event is only wired up to one event handler.

I have been working on this for days, but am not any closer to a resolution.  I am not sure when this behavior started, but I just noticed it this week.  There are other toolbars in our system that do behave correctly.

If you can help in any way, please do.  Our VWG to WiseJ conversion cannot move forward until I resolve this bug.

Thanks,
Andrew

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions