1
0
Fork 0
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:
Andrew Simachev 2025-06-01 10:48:50 +02:00
parent f4a60d0e91
commit bd383da639
No known key found for this signature in database
GPG key ID: 1DFE44B21443F0EF
2 changed files with 12 additions and 5 deletions

View file

@ -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();

View file

@ -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;