Merge pull request #1282 from pranavithape/main

Unable to edit information ...  #1279: fixed focus issue - it electro…
This commit is contained in:
V 2024-08-22 20:51:20 +02:00 committed by GitHub
commit 19e2744aff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 30903 additions and 3002 deletions

27990
desktop-app/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

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

View file

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