From 91ffc4c06bbb0e4c8a5df76642c8576b61fbde9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Sun, 17 Nov 2024 19:01:23 +0100 Subject: [PATCH] keyboard: Don't check for key.action using strict equality operator A lot of keys have no action set. In that case key.action is `undefined`, but the strict equality check of `action !== null` here will return true and we'll enter the if-case anyway. That's quite confusing and was not intended like that, so change the comparison to a less-strict operator. Part-of: --- js/ui/keyboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 8bb5b0466..a42c6ca87 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -1513,7 +1513,7 @@ export const Keyboard = GObject.registerClass({ }); } - if (key.action !== null) { + if (key.action) { button.connect('released', () => { if (key.action === 'hide') { this.close(true);