[Discover] Fix Copy to clipboard button in Data Grid popover (#145722)

## Summary

Fixes #145216

This PR fixes iteraction with `Copy to clipboard` button in Data Grid
popover in Chrome. In FF and Safari it's ok.
This commit is contained in:
Dmitry Tomashevich 2022-11-22 20:48:56 +03:00 committed by GitHub
parent 9c6272c1f2
commit d8b2b14e38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View file

@ -39,6 +39,14 @@
font-family: $euiCodeFontFamily;
}
.dscDiscoverGrid__cellPopover {
// Fixes https://github.com/elastic/kibana/issues/145216 in Chrome
.lines-content.monaco-editor-background {
overflow: unset !important;
contain: unset !important;
}
}
.dscDiscoverGrid__cellPopoverValue {
font-family: $euiCodeFontFamily;
font-size: $euiFontSizeS;

View file

@ -248,6 +248,7 @@ describe('Discover grid cell rendering', function () {
);
expect(component).toMatchInlineSnapshot(`
<EuiFlexGroup
className="dscDiscoverGrid__cellPopover"
direction="column"
gutterSize="none"
justifyContent="flexEnd"
@ -478,6 +479,7 @@ describe('Discover grid cell rendering', function () {
);
expect(component).toMatchInlineSnapshot(`
<EuiFlexGroup
className="dscDiscoverGrid__cellPopover"
direction="column"
gutterSize="none"
justifyContent="flexEnd"
@ -640,6 +642,7 @@ describe('Discover grid cell rendering', function () {
);
expect(component).toMatchInlineSnapshot(`
<EuiFlexGroup
className="dscDiscoverGrid__cellPopover"
direction="column"
gutterSize="none"
justifyContent="flexEnd"

View file

@ -189,7 +189,12 @@ function renderPopoverContent({
);
if (useTopLevelObjectColumns || field?.type === '_source') {
return (
<EuiFlexGroup gutterSize="none" direction="column" justifyContent="flexEnd">
<EuiFlexGroup
gutterSize="none"
direction="column"
justifyContent="flexEnd"
className="dscDiscoverGrid__cellPopover"
>
<EuiFlexItem grow={false}>
<EuiFlexGroup justifyContent="flexEnd" gutterSize="none">
<EuiFlexItem grow={false}>{closeButton}</EuiFlexItem>