Skip to content

Conversation

duygu-rmdn
Copy link
Contributor

fixes: #12294

@duygu-rmdn duygu-rmdn requested a review from a team September 15, 2025 13:49
Copy link

@Stoev Stoev left a comment

Choose a reason for hiding this comment

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

Looks good.

@duygu-rmdn duygu-rmdn requested a review from a team September 17, 2025 07:10
@Shamruddin
Copy link

Shamruddin commented Sep 17, 2025 via email

Copy link
Contributor

@Copilot 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

This PR fixes a bug with dialog resizing in RTL (right-to-left) mode when a max-width CSS property is set. The issue occurred because the dialog would move unexpectedly during resizing due to incorrect left position calculations when CSS constraints affected the actual rendered width.

  • Adds width assignment before calculating position deltas in RTL resize logic
  • Calculates the difference between intended and actual width to adjust position correctly
  • Includes comprehensive Cypress test coverage for the RTL max-width resizing scenario

Reviewed Changes

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

File Description
packages/main/src/Dialog.ts Fixes RTL resizing logic by setting width first and calculating delta for position adjustment
packages/main/cypress/specs/Dialog.cy.tsx Adds test case to verify dialog position stability during RTL resizing with max-width constraints

Copy link
Contributor

@TeodorTaushanov TeodorTaushanov left a comment

Choose a reason for hiding this comment

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

Add this case in the Dialog.html test page for easy testing.

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

Successfully merging this pull request may close these issues.

[Dialog]: Resize on dialog not function properly when in RTL and has max-width
4 participants