From 3d7ee7856f1c3231925cce770d1fe0b3b3bb932d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 23 Mar 2020 15:14:47 +0000 Subject: [PATCH] keyboard: Fix fallback layout when using variants Commit c1ec7b2ff meant to fall back to the base layout in case a variant like `fr+oss` is set up, but as we are checking for '+' on the array rather than the layout name, the fallback only "works" for a layout that is literally called '+', whoops. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2471 (cherry picked from commit d29e5765badbca21a6ef8b40087a8e3587b15dd4) --- 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 b4406d724..6703d11b1 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -467,7 +467,7 @@ Signals.addSignalMethods(Key.prototype); var KeyboardModel = class { constructor(groupName) { let names = [groupName]; - if (names.includes('+')) + if (groupName.includes('+')) names.push(groupName.replace(/\+.*/, '')); names.push('us');