Skip to content

Commit d1101d3

Browse files
authored
DataGrid - ColorBox in DataGrid causes input value to appear behind color preview (T1280023) (DevExpress#29959)
1 parent 10455e4 commit d1101d3

File tree

6 files changed

+48
-6
lines changed

6 files changed

+48
-6
lines changed

e2e/testcafe-devextreme/tests/dataGrid/common/editing.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import url from '../../../helpers/getPageUrl';
99
import { createWidget } from '../../../helpers/createWidget';
1010
import { changeTheme } from '../../../helpers/changeTheme';
1111
import { getData } from '../helpers/generateDataSourceData';
12+
import { Themes } from '../../../helpers/themes';
1213

1314
fixture.disablePageReloads`Editing`
1415
.page(url(__dirname, '../../container.html'));
@@ -2772,3 +2773,42 @@ test('DataGrid - A new row is added above the existing row if the data source is
27722773
},
27732774
],
27742775
}));
2776+
2777+
[
2778+
Themes.genericLight,
2779+
Themes.fluentBlue,
2780+
Themes.materialBlue,
2781+
].forEach((theme) => {
2782+
test('DataGrid - ColorBox in DataGrid causes input value to appear behind color preview (T1280023)', async (t) => {
2783+
const { takeScreenshot, compareResults } = createScreenshotsComparer(t);
2784+
const dataGrid = new DataGrid('#container');
2785+
2786+
await t.click(dataGrid.getDataCell(0, 0).element);
2787+
2788+
await t
2789+
.expect(await takeScreenshot(`grid-form-editing-with-color-box_(${theme})`, dataGrid.element))
2790+
.ok()
2791+
.expect(compareResults.isValid())
2792+
.ok(compareResults.errorMessages());
2793+
})
2794+
.before(async () => {
2795+
await changeTheme(theme);
2796+
await createWidget('dxDataGrid', {
2797+
dataSource: [
2798+
{ Color: 'red' },
2799+
],
2800+
showBorders: true,
2801+
editing: {
2802+
allowUpdating: true,
2803+
mode: 'cell',
2804+
},
2805+
onEditorPreparing(e) {
2806+
if (e.dataField === 'Color') {
2807+
e.editorName = 'dxColorBox';
2808+
e.editorOptions.readOnly = false;
2809+
}
2810+
},
2811+
});
2812+
})
2813+
.after(async () => changeTheme(Themes.genericLight));
2814+
});
2.32 KB
Loading
1.97 KB
Loading
2.2 KB
Loading

packages/devextreme-scss/scss/widgets/fluent/gridBase/_index.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,13 +480,13 @@ $fluent-grid-base-group-panel-message-line-height: $fluent-button-text-line-heig
480480
font-size: $fluent-grid-base-cell-font-size;
481481
height: $fluent-grid-base-cell-height;
482482
line-height: $fluent-grid-base-cell-height;
483-
padding-right: $fluent-grid-base-cell-horizontal-padding;
484-
padding-left: $fluent-grid-base-cell-horizontal-padding;
485-
padding-top: 0;
486-
padding-bottom: 0;
487483
margin-top: 0;
488484
}
489485

486+
&:not(.dx-tagbox):not(.dx-colorbox) .dx-texteditor-input {
487+
padding: 0 $fluent-grid-base-cell-horizontal-padding;
488+
}
489+
490490
.dx-placeholder::before {
491491
padding-right: $fluent-grid-base-cell-horizontal-padding;
492492
padding-left: $fluent-grid-base-cell-horizontal-padding;

packages/devextreme-scss/scss/widgets/material/gridBase/_index.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,13 +458,15 @@ $material-grid-base-group-panel-message-line-height: $material-button-text-line-
458458
font-size: $material-grid-base-cell-font-size;
459459
height: $material-grid-base-cell-height;
460460
line-height: $material-grid-base-cell-height;
461-
padding-right: $material-grid-base-cell-horizontal-padding;
462-
padding-left: $material-grid-base-cell-horizontal-padding;
463461
padding-top: 0;
464462
padding-bottom: 0;
465463
margin-top: 0;
466464
}
467465

466+
&:not(.dx-tagbox):not(.dx-colorbox) .dx-texteditor-input {
467+
padding: 0 $material-grid-base-cell-horizontal-padding;
468+
}
469+
468470
.dx-placeholder::before {
469471
padding-right: $material-grid-base-cell-horizontal-padding;
470472
padding-left: $material-grid-base-cell-horizontal-padding;

0 commit comments

Comments
 (0)