Dialog triggered from context menu with multiple selected items

When a dialog is triggered from a context menu and multiple items are selected then a File Function dialog box pops up behind the foreground dialog. The same does not happen if only one item is selected or if the dialog is triggered from a button or an instant command. In the screen grab I moved the foreground dialog to the right so that the background File Function dialog is fully visible. Sample qnd.js code is attached.


qnd.zip (630 Bytes)

function OnInit(initData)
{
	initData.name = "qnd";
	initData.desc = "Quick 'n Dirty";
	initData.default_enable = true;
	
	var cmd = initData.AddCommand();
	cmd.name = initData.name;
	cmd.method = "do_main";
	cmd.desc = initData.desc;
	cmd.label = initData.name;
	cmd.template = "parms/m";
}

function do_main(clickData)
{
	var src = clickData.func.sourcetab;
	var dlg = clickData.func.dlg;
	dlg.window = src;
	dlg.template = "dialog1";
	dlg.detach = true;
	dlg.title = "dialog1";
	dlg.show;
	var iteration = 0;
	var msg_obj;
	var str = "Starting...", ctl_name;
	DOpus.output(str);
	do{
		msg_obj = dlg.getmsg(); if (msg_obj==false) break;
		str = iteration++;
		str+= " : msg_obj.event = " + msg_obj.event;
		ctl_name = msg_obj.control;
		str+= " : msg_obj.control = " + ctl_name;
		DOpus.output(str);
	}
	while (msg_obj);
}

==SCRIPT RESOURCES
<resources>
	<resource name="dialog1" type="dialog">
		<dialog fontsize="8" height="87" lang="english" width="135">
		</dialog>
	</resource>
</resources>

Looks like a solution is to add a @noprogress directive as advised by @leo in this post.