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

Apply format issue with Japanese keyboard on mobile #2909

Open
haven2world opened this issue Dec 11, 2024 · 8 comments
Open

Apply format issue with Japanese keyboard on mobile #2909

haven2world opened this issue Dec 11, 2024 · 8 comments

Comments

@haven2world
Copy link
Contributor

Describe the bug
When a user use Japanese keyboard on mobile the toggle format doesn't work correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to demo site on mobile (iOS or Android)
  2. Click on toggle bold button
  3. type some characters but don't click the confirm button
  4. click the toggle bold button again
  5. type some more characters and click the confirm button

Expected behavior
The text shouldn't be bold

Screenshots
https://github.com/user-attachments/assets/48ad5165-24b0-4c78-8568-5b20b37f5ef7

Device Information
on both iOS and Android

@haven2world
Copy link
Contributor Author

bump this issue

@JiuqingSong
Copy link
Collaborator

I tried but as soon as I press the button, IME is dismissed so English letter will be applied to editor.

Any special way to make the IME not dismissed?

@haven2world
Copy link
Contributor Author

Were you using Japanese keyboard? Feels like it's a Japanese keyboard specific issue

@JiuqingSong
Copy link
Collaborator

Yes:

Image

@haven2world
Copy link
Contributor Author

Probably you need to run it on mobile

@JiuqingSong
Copy link
Collaborator

probably. In that case can you help debug and see why? Or maybe an easier fix is just to dismiss the IME when click out.

@haven2world
Copy link
Contributor Author

Sure, but I'm not familiar with this part, do you have any clue or where should I start to debug?

@JiuqingSong
Copy link
Collaborator

In formatSegmentWithContentModel.ts, if selection is collapsed, we will pass the pending format back:

Image

Then in formatContentModel.ts, we apply this pending format into editor core:

Image

Finally in FormatPlugin, while handling compositionEnd event, we call checkAndApplyPendingFormat to put it into model:

Image

That is the whole flow of how pending format works.

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

No branches or pull requests

2 participants