Skip to content

TF-3835 Fix problems with selecting Italic in fonts on Android #3842

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dab246
Copy link
Member

@dab246 dab246 commented Jun 26, 2025

Issue

#3835

Root cause

Because document.onselectionchange is only fired when the selection changes, not when the content or formatting of the selection changes. When document.execCommand('italic') applies the formatting but does not change the selection, so onselectionchange is not called again.

Solution

Use MutationObserver to listen for DOM changes.

Dependency

Resolved

  • Android:
demo-android.webm
  • iOS:
Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2025-06-26.at.13.04.05.mp4

Signed-off-by: dab246 <tdvu@linagora.com>
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.

1 participant