mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
JS-4052: fix
This commit is contained in:
parent
f4a60d0e91
commit
bd383da639
2 changed files with 12 additions and 5 deletions
|
@ -276,6 +276,17 @@ class Api {
|
|||
return data;
|
||||
};
|
||||
|
||||
focusWindow (win) {
|
||||
if (!win || win.isDestroyed()) {
|
||||
return;
|
||||
};
|
||||
|
||||
win.show();
|
||||
win.focus();
|
||||
win.setAlwaysOnTop(true);
|
||||
win.setAlwaysOnTop(false);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
module.exports = new Api();
|
|
@ -925,11 +925,7 @@ class Dispatcher {
|
|||
const { object } = payload;
|
||||
|
||||
U.Object.openAuto(object);
|
||||
window.focus();
|
||||
|
||||
if (electron.focus) {
|
||||
electron.focus();
|
||||
};
|
||||
Renderer.send('focusWindow');
|
||||
|
||||
analytics.createObject(object.type, object.layout, analytics.route.webclipper, 0);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue