fix: SDA-2806 - Fix notification inline reply focus issue with Windows (#1162)

This commit is contained in:
Kiran Niranjan 2020-12-29 18:23:39 +05:30 committed by GitHub
parent 40080cd316
commit 420dee0d48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -415,6 +415,20 @@ class Notification extends NotificationHandler {
if (windowExists(window)) {
this.renderNotification(window, data);
}
// This is a workaround to make sure the notification
// with visible input always stays on top of normal notifications
if (isWindowsOS) {
this.activeNotifications.forEach((activeNotification) => {
if (!activeNotification || !windowExists(activeNotification)) {
return;
}
const [, height] = activeNotification.getSize();
// Height of notification window with input will be 104
if (height > notificationSettings.height) {
activeNotification.moveTop();
}
});
}
return resolve(window);
});
});