From e287528eda0ba1a3056c8693baeb8e7f6588342e Mon Sep 17 00:00:00 2001 From: Jacek Kolezynski Date: Fri, 13 Dec 2024 09:35:42 +0100 Subject: [PATCH] [Security Solution] Change handling whitespace for textarea autoheight to `pre` (#203993) **Resolves: #178615** ## Summary Change the way kbnQueryBar__textarea--autoHeight css class handles the whitespace. Instead of `normal` use `pre`. This improves the behavior for long pre-formatted texts in the query field in Firefox. It doesn't affect Chrome nor Safari. ## BEFORE ### Chrome image ### Safari image ### Firefox **(the issue is here)** image ## AFTER ### Chrome image ### Safari image ### Firefox **(Note that the issue is gone)** image Note: please notice that for some reason, with this setting, Firefox additionally presents the whole text at the bottom as one line. But that should be OK. image --- .../public/query_string_input/query_string_input.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/unified_search/public/query_string_input/query_string_input.scss b/src/plugins/unified_search/public/query_string_input/query_string_input.scss index 46473af849c9b..89af2e8e9911a 100644 --- a/src/plugins/unified_search/public/query_string_input/query_string_input.scss +++ b/src/plugins/unified_search/public/query_string_input/query_string_input.scss @@ -51,7 +51,7 @@ &.kbnQueryBar__textarea--autoHeight { overflow-x: auto; overflow-y: auto; - white-space: normal; + white-space: pre; max-height: calc(35vh - 100px); min-height: $euiFormControlHeight; }