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 Firefox scanning when some combining characters are present #1214

Merged
merged 6 commits into from
Jul 14, 2024

Conversation

Kuuuube
Copy link
Member

@Kuuuube Kuuuube commented Jul 13, 2024

Firefox's implementation of Range.getClientRects() does not match Chromium when text contains certain unicode combining characters and cannot be relied upon.

Fun 12 year old bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=816238

This was previously handled in Yomichan but 5 years ago it was removed in ea9c5ad. Japanese text and Japanese combining characters do not have this issue but some other languages do.

Fixes #1002

@Kuuuube Kuuuube added kind/bug The issue or PR is regarding a bug browser/firefox The issue is Firefox-only labels Jul 13, 2024
@Kuuuube Kuuuube requested a review from a team as a code owner July 13, 2024 02:26
@jamesmaa
Copy link
Collaborator

Why was it removed previously?

Casheeew
Casheeew previously approved these changes Jul 13, 2024
@Kuuuube
Copy link
Member Author

Kuuuube commented Jul 13, 2024

Why was it removed previously?

The issues it had with japanese were not present anymore.

I've made it so this only applies to Thai now as that's only one we have reported and we probably do want this check to stay for the languages it works fine on. If needed more languages can be added to the exclude list.

@Kuuuube Kuuuube added this pull request to the merge queue Jul 14, 2024
Merged via the queue into themoeway:master with commit b07e24c Jul 14, 2024
10 checks passed
@Kuuuube Kuuuube deleted the fix-firefox-scanning branch July 14, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser/firefox The issue is Firefox-only kind/bug The issue or PR is regarding a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Base character gets ignored when scanning Thai text starting with a diacritic on Firefox
4 participants