Skip to content

DataGrid - Native horizontal scrollbar is temporarily shown when clicking cells in batch/cell mode if focused row and column fixing features are enabled (T1310336)#33374

Open
markallenramirez wants to merge 2 commits intoDevExpress:26_1from
markallenramirez:bug_T1310336/26_1

Conversation

@markallenramirez
Copy link
Copy Markdown
Contributor

No description provided.

@markallenramirez markallenramirez self-assigned this Apr 22, 2026
@markallenramirez markallenramirez requested a review from a team as a code owner April 22, 2026 12:02
Copilot AI review requested due to automatic review settings April 22, 2026 12:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a DataGrid UI regression where a native horizontal scrollbar briefly appears when interacting with cells in batch/cell editing mode while focused row and column fixing (sticky columns) are enabled.

Changes:

  • Adjusts focus overlay sizing under sticky columns to avoid the 1px width expansion for group rows.
  • Hides the focus overlay when the focused element is a data row (tr.dx-data-row) to prevent transient overflow that can trigger a native horizontal scrollbar.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/devextreme/js/__internal/grids/grid_core/sticky_columns/m_sticky_columns.ts Tweaks focus overlay width calculation in sticky columns mode to avoid an extra pixel for group rows.
packages/devextreme/js/__internal/grids/grid_core/editor_factory/m_editor_factory.ts Updates focus overlay rendering to keep it hidden when focus is on a data row element, reducing overflow/scrollbar flicker risk.

Copilot AI review requested due to automatic review settings April 23, 2026 10:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

packages/devextreme/js/__internal/grids/grid_core/editor_factory/m_editor_factory.ts:250

  • When isDataRowElement is true, the focus overlay is being hidden, but the method still appends the overlay to the DOM, resizes it, and runs positioning calculations. This extra work is unnecessary and can cause avoidable layout/paint work; consider early-returning (or skipping size/position setup) when the overlay should remain hidden for data rows, similar to the existing isHideBorder branch.
      const align = browser.mozilla ? 'right bottom' : 'left top';
      const isDataRowElement = isDataRow($element);
      const isFocusedCellInvalid = $element.hasClass(this.addWidgetPrefix(CELL_INVALID_CLASS));
      const isFocusedCellModified = $element.hasClass(CELL_MODIFIED_CLASS) && !isFocusedCellInvalid;
      const $content = this.getFocusOverlayContainer($element);
      const focusOverlaySize = this.getFocusOverlaySize($element);

      this._$focusOverlay
        .toggleClass(DX_HIDDEN, isDataRowElement)
        .toggleClass(FOCUSED_CELL_INVALID_CLASS, isFocusedCellInvalid)
        .toggleClass(FOCUSED_CELL_MODIFIED_CLASS, isFocusedCellModified)
        .appendTo($content);

      setOuterHeight(this._$focusOverlay, focusOverlaySize.height);
      setOuterWidth(this._$focusOverlay, focusOverlaySize.width);

@Alyar666 Alyar666 self-requested a review April 28, 2026 08:35
@@ -233,13 +234,14 @@ export class EditorFactory extends ViewControllerWithMixin {
} else if ($element.length) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can’t the isDataRow check be moved into this condition?

$element,
this.addWidgetPrefix.bind(this),
);
const isGroupRow = isGroupRowElement($element);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to add a check for the group footer row.

For master/adaptive detail rows, I’ve checked — everything seems fine there. Please make sure to verify this as well.

const firstGroupRow = dataGrid.getGroupRow(0);
const firstDataRow = dataGrid.getDataRow(1);
const secondDataCell = firstDataRow.getDataCell(2);
const hasHorizontalScroll = async () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment: Could we move this into the DataGrid helpers? For example, into domUtils?

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