Skip to content

Commit 7eca337

Browse files
committed
Perform blur workaround only on macOS
1 parent 1c3f202 commit 7eca337

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

webui/src/js/windowStateUtils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,14 @@ function(wktProject, wktConsole, wdtDiscoverer, dialogHelper, projectIO,
268268
}
269269

270270
/**
271-
* Remove keyboard focus from the active DOM element.
271+
* Remove keyboard focus from the active DOM element (macOS only).
272272
* This causes Ace editor and Jet controls to persist their current values.
273273
* This workaround is required because the menu-will-show event on the application menu
274-
* does not fire correctly on MacOS, so the blur-focused-item IPC is not sent to the renderer.
274+
* does not fire correctly on macOS, so the blur-focused-item IPC is not sent to the renderer.
275275
* See GitHub electron issue 31915.
276276
*/
277277
function blurSelection() {
278-
if(document.activeElement) {
278+
if(window.api.process.isMac() && document.activeElement) {
279279
document.activeElement.blur();
280280
}
281281
}

0 commit comments

Comments
 (0)