Skip to content
This repository was archived by the owner on Jan 24, 2020. It is now read-only.

Commit 59b8a5e

Browse files
author
Avaer Kazmer
committed
Add bring UI to top logic
1 parent 8fbad04 commit 59b8a5e

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

index.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,14 +1108,19 @@
11081108
uiIframe.width = window.innerWidth;
11091109
uiIframe.height = window.innerHeight;
11101110
});
1111-
window.addEventListener('focus', e => {
1111+
const _bringUiToTop = () => {
11121112
uiIframe.setAlwaysOnTop(true);
1113-
});
1114-
window.addEventListener('blur', e => {
11151113
uiIframe.setAlwaysOnTop(false);
1114+
};
1115+
window.addEventListener('focus', e => {
1116+
_bringUiToTop();
1117+
});
1118+
window.addEventListener('maximize', e => {
1119+
_bringUiToTop();
11161120
});
11171121
window.addEventListener('restore', e => {
11181122
uiIframe.show();
1123+
_bringUiToTop();
11191124
});
11201125
window.addEventListener('minimize', e => {
11211126
uiIframe.hide();

0 commit comments

Comments
 (0)