IDEMPIERE-5778 - Focus is not set to Process Modal Dialog in Info Windows (#1916)
This commit is contained in:
parent
a0f1793719
commit
7b42d4acb8
|
@ -994,6 +994,8 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
|
||||||
protected void cancelProcess()
|
protected void cancelProcess()
|
||||||
{
|
{
|
||||||
m_cancel = true;
|
m_cancel = true;
|
||||||
|
if(getParent() != null && getParent() instanceof HtmlBasedComponent)
|
||||||
|
((HtmlBasedComponent)getParent()).focus();
|
||||||
this.dispose();
|
this.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
import org.compiere.util.Trx;
|
import org.compiere.util.Trx;
|
||||||
import org.zkoss.zk.ui.Component;
|
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.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
|
||||||
|
@ -132,7 +133,7 @@ public class WProcessCtl extends AbstractProcessCtl {
|
||||||
para.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
|
para.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
|
||||||
AEnv.showWindow(para);
|
AEnv.showWindow(para);
|
||||||
}
|
}
|
||||||
|
Executions.schedule(para.getDesktop(), e -> para.focus(), new Event("onPostShowProcessModalDialog"));
|
||||||
}
|
}
|
||||||
} // execute
|
} // execute
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue