Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.16] [Security Solution] Change handling whitespace for textarea autoheight to `pre` (#203993) #204171

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.16:

Questions ?

Please refer to the Backport tool documentation

…t to `pre` (elastic#203993)

**Resolves: elastic#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
<img width="1013" alt="image"
src="https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e"
/>

### Safari
<img width="925" alt="image"
src="https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f"
/>

### Firefox **(the issue is here)**
<img width="927" alt="image"
src="https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7"
/>

## AFTER
### Chrome
<img width="1014" alt="image"
src="https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b"
/>

### Safari
<img width="942" alt="image"
src="https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8"
/>

### Firefox **(Note that the issue is gone)**
<img width="924" alt="image"
src="https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97"
/>

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.
<img width="831" alt="image"
src="https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6"
/>

(cherry picked from commit e287528)
@kibanamachine kibanamachine merged commit 0aff81d into elastic:8.16 Dec 13, 2024
11 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
unifiedSearch 353.7KB 353.7KB -6.0B

cc @jkelas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants