Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More resilient directionality checks #2189

Merged
merged 6 commits into from
Oct 10, 2024
Merged

Conversation

claviska
Copy link
Member

fixes #2188

Copy link

vercel bot commented Sep 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
shoelace ✅ Ready (Inspect) Visit Preview Oct 10, 2024 6:03pm

@fbecker-complex
Copy link
Contributor

Thanks for the quick fix!

@clxmstaab
Copy link

we can confirm the fix is working for us.

@@ -259,7 +259,7 @@ export class SubmenuController implements ReactiveController {
}

renderSubmenu() {
const isRtl = this.host.matches(':dir(rtl)');
const isRtl = getComputedStyle(this.host).direction === 'rtl';
Copy link
Collaborator

Choose a reason for hiding this comment

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

any reason these don't do this.host.localize.dir() ?

Copy link
Member Author

Choose a reason for hiding this comment

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

The localize property is private and this only occurs once when the submenu shows, so a reflow won't be problematic. We could consider exposing this.localize as public properties, but I didn't want to commit to that without a discussion first.

Copy link
Collaborator

Choose a reason for hiding this comment

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

🤷 fine with me

@KonnorRogers KonnorRogers merged commit 2c66c85 into next Oct 10, 2024
2 checks passed
@staabm
Copy link
Contributor

staabm commented Oct 23, 2024

Any plans to get this released?

@claviska
Copy link
Member Author

I'll get a Shoelace release out most likely tomorrow morning.

@staabm
Copy link
Contributor

staabm commented Oct 26, 2024

Thank you 😊

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.

RTL- / LTR-detection leads to hard errors in older browsers
5 participants