IDEMPIERE-5211 Restore field focus after opening of dialog or navigate to other tab (#1214)

- Fix for cancelling of Report and Record Access dialog
This commit is contained in:
hengsin 2022-03-03 23:15:09 +08:00 committed by GitHub
parent b6ce1e7cbe
commit 10d4399b0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -990,6 +990,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
@Override
public void onEvent(Event event) throws Exception {
toolbar.lock(adTabbox.getSelectedGridTab().isLocked());
focusToLastFocusEditor();
}
});
@ -2891,6 +2892,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
public void onCallback(Boolean result) {
if (result) {
onReport0();
} else {
focusToLastFocusEditor();
}
}
};

View File

@ -104,6 +104,7 @@ public class ReportAction implements EventListener<Event>
winReport.setBorder("normal");
winReport.setStyle("position:absolute");
winReport.addEventListener("onValidate", this);
winReport.addCallback(Window.AFTER_PAGE_DETACHED, t -> panel.focusToLastFocusEditor());
cboPrintFormat.setMold("select");
cboPrintFormat.getItems().clear();