Dialog reselection triggers first control

Not sure if this is a bug or working as designed. Here is very simple demo.

The debug output after opening the dialog then navigating away and back again without clicking any control is:

0 : msg_obj.event = click : msg_obj.control = radio1

Code and resources as shown below and the button is attached as a DCF.

DlgTest.dcf (7.9 KB)

function OnClick(clickData)
	var src = clickData.func.sourcetab;
	var dlg = clickData.func.dlg;
	dlg.window = src;
	dlg.template = "dialog1";
	dlg.detach = true;
	dlg.title = "dialog1";
	var iteration = 0;
	var msg_obj;
	var str;
		msg_obj = dlg.getmsg(); if (msg_obj==false) break;
		str = iteration++;
		str+= " : msg_obj.event = " + msg_obj.event;
		str+= " : msg_obj.control = " + msg_obj.control;
	while (msg_obj);

Resources are defined as:

	<resource name="dialog1" type="dialog">
		<dialog fontsize="8" height="87" lang="" width="135">
			<control height="57" name="group1" title="Group" type="group" width="77" x="14" y="6" />
			<control height="10" name="radio1" title="Radio Button" type="radio" width="64" x="19" y="22" />
			<control height="10" name="radio2" title="Radio Button" type="radio" width="64" x="19" y="34" />
			<control height="10" name="radio3" title="Radio Button" type="radio" width="64" x="19" y="46" />

For some reason this seems to be just how radio button controls behave, see this thread as an example.

We can probably block it coming through to the script though.

Thanks for confirming.The behaviour was certainly unexpected. Blocking it would be the preferred long term solution. In the meantime I have added code to intercept and ignore.