Overview
Differences between bringToFront
, setAsForeground
& alwaysOnTop
When calling bringToFront
this will bring the window to the front of the stack if an OpenFin process is an active window. If there is another active window, such as native chrome, the window will be brought to the front of the OpenFin stack but will remain behind chrome (this is expected behaviour).
However, setAsForeground
activates the OpenFin process and brings the window to the top of the z-order stack (in front of native windows as well) and gives focus to the window in one transaction.
If you require the OpenFin window not to be in focus when brought to the front, you could toggle the alwaysOnTop
window option (updatable flag). This option positions the window at the top of the window stack.
const win = await fin.Window.getCurrent();
await win.updateOptions({
alwaysOnTop: true
});
await win.updateOptions({
alwaysOnTop: false
});
When switching the alwaysOnTop
option to false
, this will disable the focus for the window.
Another way to remove the focus from a window is to use the blur
window option.
API documentation:
Comments
0 comments
Please sign in to leave a comment.