diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AbstractProcessDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AbstractProcessDialog.java index 2485f61069..092659e644 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AbstractProcessDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/AbstractProcessDialog.java @@ -994,6 +994,8 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI protected void cancelProcess() { m_cancel = true; + if(getParent() != null && getParent() instanceof HtmlBasedComponent) + ((HtmlBasedComponent)getParent()).focus(); this.dispose(); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WProcessCtl.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WProcessCtl.java index 1a881f2289..93035a8ffc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WProcessCtl.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/WProcessCtl.java @@ -36,6 +36,7 @@ import org.compiere.util.Env; import org.compiere.util.Msg; import org.compiere.util.Trx; import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.Executions; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; @@ -132,7 +133,7 @@ public class WProcessCtl extends AbstractProcessCtl { para.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED); AEnv.showWindow(para); } - + Executions.schedule(para.getDesktop(), e -> para.focus(), new Event("onPostShowProcessModalDialog")); } } // execute