[6fc8f95bc6465849249d974d53eecc56c00ffda0fc3c7024bfa5b8e4d794b072/gnome-3-36] keyboard: Fix setting height in portrait orientation



commit d26b320ab7446b208bd1fbdb009a1811957fdf22
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Jul 4 02:22:10 2020 +0200

    keyboard: Fix setting height in portrait orientation
    
    get_preferred_height() returns both the minimum and natural height,
    not a single size. Math.min() doesn't handle that and returns NaN,
    whoops.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2349

 js/ui/keyboard.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index e8a79f5078..a3a30c0234 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1609,7 +1609,8 @@ class Keyboard extends St.BoxLayout {
              * we allow the OSK being smaller than 1/3rd of the monitor height
              * there.
              */
-            this.height = Math.min(maxHeight, this.get_preferred_height(monitor.width));
+            const [, natHeight] = this.get_preferred_height(monitor.width);
+            this.height = Math.min(maxHeight, natHeight);
         }
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]