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

fix: ensure element dir properties persist with text changes #12204

Merged
merged 3 commits into from
Jun 27, 2024
Merged

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Jun 27, 2024

This seems like a Chromium based issue, but other way, we can ensure that the UI bidi direction is kept up-to-date by applying the dir attribute again on updates. Fixes #12193.

Pretty hard to test this one unless we use screenshot tests with Playwright.

Copy link

changeset-bot bot commented Jun 27, 2024

🦋 Changeset detected

Latest commit: 3d8e9cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dummdidumm
Copy link
Member

This code looks like it does nothing so we definitely need to comment in the code why we do it.
Honestly infuriating that we need to resort to such a "set the attribute to its same value" hack.

@trueadm
Copy link
Contributor Author

trueadm commented Jun 27, 2024

This code looks like it does nothing so we definitely need to comment in the code why we do it. Honestly infuriating that we need to resort to such a "set the attribute to its same value" hack.

It's been like this for ages. Lexical applies the same hack to work around it too, and I think so does ProseMirror. I also literally added a comment just before you commented :D

@trueadm trueadm merged commit d3111db into main Jun 27, 2024
9 checks passed
@trueadm trueadm deleted the direction branch June 27, 2024 13:40
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.

Svelte 5: non-keyed each blocks do not retain text direction in elements with dir="auto"
2 participants