Skip to content

DropDownButton – FilterBuilder editor does not close after clicking outside it when it is rendered via dropDownContentTemplate (T1300811) - #34409

Merged
markallenramirez merged 7 commits into
DevExpress:mainfrom
markallenramirez:bug_T1300811/main
Jul 28, 2026
Merged

DropDownButton – FilterBuilder editor does not close after clicking outside it when it is rendered via dropDownContentTemplate (T1300811)#34409
markallenramirez merged 7 commits into
DevExpress:mainfrom
markallenramirez:bug_T1300811/main

Conversation

@markallenramirez

Copy link
Copy Markdown
Contributor

No description provided.

@markallenramirez markallenramirez self-assigned this Jul 21, 2026
@markallenramirez
markallenramirez requested a review from a team as a code owner July 21, 2026 11:06
Copilot AI review requested due to automatic review settings July 21, 2026 11:06

Copilot AI left a comment

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.

Pull request overview

Addresses T1300811 where a FilterBuilder value editor embedded inside a DropDownButton dropDownContentTemplate does not close when clicking outside the editor, by adding an end-to-end regression test and extending the FilterBuilder TestCafe model to access the value editor’s TextBox.

Changes:

  • Added Field.getTextBox() helper to the TestCafe FilterBuilder field model.
  • Added a new TestCafe E2E test covering editor closing behavior when FilterBuilder is rendered in DropDownButton dropDownContentTemplate.

Reviewed changes

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

File Description
packages/testcafe-models/filterBuilder/field.ts Adds a TextBox accessor for FilterBuilder field value editing.
e2e/testcafe-devextreme/tests/common/filterBuilder/filterBuilderEditor.ts Adds regression test for closing the embedded editor on outside click (T1300811).

Comment thread packages/testcafe-models/filterBuilder/field.ts Outdated
Copilot AI review requested due to automatic review settings July 24, 2026 05:47

Copilot AI left a comment

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.

Pull request overview

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

Copilot AI review requested due to automatic review settings July 27, 2026 04:38

Copilot AI left a comment

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.

Pull request overview

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

Comment thread packages/testcafe-models/filterBuilder/field.ts
Copilot AI review requested due to automatic review settings July 27, 2026 04:41

Copilot AI left a comment

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.

Pull request overview

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

Comments suppressed due to low confidence (1)

packages/testcafe-models/filterBuilder/field.ts:27

  • getTextBox() creates a TextBox from a broad .dx-textbox selector, which can match unrelated/hidden text boxes on the page and make tests flaky. Narrow the selector to the visible textbox instance used by the value editor.
  // eslint-disable-next-line class-methods-use-this
  getTextBox(): TextBox { return new TextBox(`.${CLASS.textBox}`); }

Copilot AI review requested due to automatic review settings July 27, 2026 05:54

Copilot AI left a comment

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.

Pull request overview

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

Copilot AI review requested due to automatic review settings July 27, 2026 06:29

Copilot AI left a comment

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.

Pull request overview

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

Comments suppressed due to low confidence (1)

e2e/testcafe-devextreme/tests/common/filterBuilder/filterBuilderEditor.ts:94

  • To make the “click outside editor” step deterministic, render a small dedicated area inside the DropDownButton popup content (sibling of the FilterBuilder) that the test can click. This avoids relying on negative offsets and theme-dependent popup paddings.
    dropDownContentTemplate() {
      return ($('<div>') as any)
        .attr('id', 'filterBuilder')
        .dxFilterBuilder({
          fields: [{ dataField: 'text' }],

Comment thread packages/devextreme/js/__internal/filter_builder/m_filter_builder.ts Outdated
Comment on lines +773 to +774
const overlay = $(activeElement).closest(`.${DROPDOWN_EDITOR_OVERLAY_CLASS}`);
const overlayID = overlay.find(`.${POPUP_CONTENT_CLASS}`).attr('id');

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.

How about fetch popupContent element directly:

    const $popupContent = $(activeElement).closest(`.${POPUP_CONTENT_CLASS}`);

    if ($popupContent.length === 0) {
      return false;
    }

    const overlayID = $popupContent.attr('id');

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The popupContent element does not occupy the entire overlay.
Screenshot 2026-07-28 125736

In this case, the following line will not find popupContent when clicking outside it even if you clicked inside the overlay area.

const $popupContent = $(activeElement).closest(`.${POPUP_CONTENT_CLASS}`);

Copilot AI review requested due to automatic review settings July 28, 2026 05:09

Copilot AI left a comment

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.

Pull request overview

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

Comments suppressed due to low confidence (1)

packages/testcafe-models/filterBuilder/field.ts:27

  • getTextBox() uses a global .dx-textbox selector, which can match unrelated text boxes on the page and make tests interact with the wrong element. Since Field already has a scoped element, use it to locate the textbox within this specific field.
  // eslint-disable-next-line class-methods-use-this
  getTextBox(): TextBox { return new TextBox(`.${CLASS.textBox}`); }

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