mirror of
https://github.com/responsively-org/responsively-app
synced 2024-11-10 06:44:13 +00:00
Unable to edit information ... #1279: fixed focus issue - it electron bug of focus
This commit is contained in:
parent
d85ff01804
commit
3c3078dec0
5 changed files with 30903 additions and 3002 deletions
27990
desktop-app/package-lock.json
generated
Normal file
27990
desktop-app/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
4
desktop-app/release/app/package-lock.json
generated
4
desktop-app/release/app/package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "ResponsivelyApp",
|
"name": "ResponsivelyApp",
|
||||||
"version": "1.10.0",
|
"version": "1.13.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "ResponsivelyApp",
|
"name": "ResponsivelyApp",
|
||||||
"version": "1.10.0",
|
"version": "1.13.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -177,6 +177,30 @@ const createWindow = async () => {
|
||||||
)}`
|
)}`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const isWindows = process.platform === 'win32';
|
||||||
|
let needsFocusFix = false;
|
||||||
|
let triggeringProgrammaticBlur = false;
|
||||||
|
|
||||||
|
mainWindow.on('blur', () => {
|
||||||
|
if (!triggeringProgrammaticBlur) {
|
||||||
|
needsFocusFix = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mainWindow.on('focus', () => {
|
||||||
|
if (isWindows && needsFocusFix) {
|
||||||
|
needsFocusFix = false;
|
||||||
|
triggeringProgrammaticBlur = true;
|
||||||
|
setTimeout(function () {
|
||||||
|
mainWindow!.blur();
|
||||||
|
mainWindow!.focus();
|
||||||
|
setTimeout(function () {
|
||||||
|
triggeringProgrammaticBlur = false;
|
||||||
|
}, 100);
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
mainWindow.on('ready-to-show', async () => {
|
mainWindow.on('ready-to-show', async () => {
|
||||||
await initInstance();
|
await initInstance();
|
||||||
if (!mainWindow) {
|
if (!mainWindow) {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue