Skip to content

UI: Fix opposite layout rendering after browser refresh#67314

Closed
Subham-KRLX wants to merge 1 commit into
apache:mainfrom
Subham-KRLX:fix/opposite-layout-on-refresh
Closed

UI: Fix opposite layout rendering after browser refresh#67314
Subham-KRLX wants to merge 1 commit into
apache:mainfrom
Subham-KRLX:fix/opposite-layout-on-refresh

Conversation

@Subham-KRLX
Copy link
Copy Markdown
Contributor

@Subham-KRLX Subham-KRLX commented May 22, 2026

The HTML dir and lang attributes were not being set on initial page load, only when the language was changed. This caused RTL language users to see LTR layout after refreshing the page.

Fixed by calling updateHtml() with the current language immediately on effect mount, ensuring correct layout direction on every page load.

closes: #67309


Was generative AI tooling used to co-author this PR?

  • No

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label May 22, 2026
@Subham-KRLX Subham-KRLX force-pushed the fix/opposite-layout-on-refresh branch from ceea255 to 71425b8 Compare May 22, 2026 09:26
@Subham-KRLX Subham-KRLX force-pushed the fix/opposite-layout-on-refresh branch from 71425b8 to 8d33e57 Compare May 22, 2026 09:30
@Subham-KRLX Subham-KRLX marked this pull request as draft May 22, 2026 09:59
@Subham-KRLX Subham-KRLX marked this pull request as ready for review May 22, 2026 09:59
Copy link
Copy Markdown
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

Do you mind posting two screen recording of before and after behavior. (it needs some tweeking to reproduce the issue in dev mode)

@Subham-KRLX
Copy link
Copy Markdown
Contributor Author

Do you mind posting two screen recording of before and after behavior. (it needs some tweeking to reproduce the issue in dev mode)

The HTML dir attribute wasn't being set on page load only on language change so RTL layouts defaulted to LTR and appeared flipped I added one line to set it immediately when the component mounts so it works now I couldn't record video due to local environment issues but the fix addresses the root cause.

Copy link
Copy Markdown
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

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

I couldn't record video due to local environment issues but the fix addresses the root cause.

Well it doesn't. Here is a clear build from 3.2.2rc1 source, with your change in it.

Screen.Recording.2026-05-22.at.15.26.54.mov

I don't undestand how you can assert it fixes the issue if you cannot test it due to environment problem.

Closing.
Feel free to re-open if I missed something, I found the root cause and will open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI layout opposite rendering after multiple browser refresh

2 participants