mirror of
https://github.com/responsively-org/responsively-app
synced 2024-11-10 14:54:12 +00:00
Merge pull request #1282 from pranavithape/main
Unable to edit information ... #1279: fixed focus issue - it electro…
This commit is contained in:
commit
19e2744aff
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",
|
||||
"version": "1.10.0",
|
||||
"version": "1.13.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ResponsivelyApp",
|
||||
"version": "1.10.0",
|
||||
"version": "1.13.0",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"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 () => {
|
||||
await initInstance();
|
||||
if (!mainWindow) {
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue