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

[Xiaomi] Buggy double characters on mobiles #15584

Open
lazar2038 opened this issue Dec 22, 2023 · 12 comments
Open

[Xiaomi] Buggy double characters on mobiles #15584

lazar2038 opened this issue Dec 22, 2023 · 12 comments
Labels
domain:mobile This issues reports a problem related to a mobile environment. domain:typing/ime This issue reports a problem with standard typing & IME (typing method for CJK languages). package:typing type:bug This issue reports a buggy (incorrect) behavior.

Comments

@lazar2038
Copy link

📝 Provide detailed reproduction steps (if any)

  1. Open editor on the mobile

  2. Choose any language. Let it be "English" for example

  3. Start typing "Z", make empty space

  4. then type "zx", and it will convert to "zzx"

  5. You may also type "c", add space, and it will be converted to "cc"

  • Browser: Chrome Mobile, Mi Browser
  • OS: Miui global 14
  • First affected CKEditor version: 4,5

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@lazar2038 lazar2038 added the type:bug This issue reports a buggy (incorrect) behavior. label Dec 22, 2023
@Witoso
Copy link
Member

Witoso commented Dec 27, 2023

Hi, thanks for the report. Do you use some specific keyboard (like Gboard) or the built-in one in Miui?

@Witoso Witoso added domain:mobile This issues reports a problem related to a mobile environment. pending:feedback This issue is blocked by necessary feedback. labels Dec 27, 2023
@lazar2038
Copy link
Author

lazar2038 commented Dec 27, 2023

No, we tested it on native keyboard on all the Xiaomi smartphones.

I have attached the test file to this comment, you can rename it to .html and test. This is a native CKEditor example from the website.
test.txt

Thank you.

@Witoso Witoso changed the title Buggy double characters on EVERY mobile! [Xiaomi] Buggy double characters on mobiles Dec 27, 2023
@caprisc
Copy link

caprisc commented Jan 3, 2024

It's not only Xiaomi!
There are other android phones that have that problem as well (at least some users in our woltlab suite forum experience the same issue).
And on my BlackBerry KeyOne (with Android8) it's the same - and a bit different.

The double first characters do occur with the built-in external physical keyboard, but not always.
It only occurs after the first word, so the first word in a paragraph doesn't have any double letters.
I tried to replicate it with the virtual keyboard - didn't get the double characters to work - but the double first characters are not present with the physical keyboard right now as well.

But there's another issue that might be related and seems to switch places with the 'double characters' (physical or virtual keyboard, doesn't matter - it's either this below or double characters, not both at the same time):
I cannot delete words. Every time i try to delete a word with backspace it gets to the last/first letter and just... duplicates the whole word. Sometimes even multiple times.
It's hard to explain

Let's just say I type in 'physical' and try to remove that word letter by letter with backspace. Once I get to the p, the whole word 'physical' just pops up again as if I never deleted it. If I want to write the next word and press 'space' it just copies the whole word again.
'physical' becomes 'physicalphysical', or maybe even 'physicalphy' if I pressed space after 'phy' while deleting that word.

I cannot 'select all' and delete that word either, it just... copypastes once I just try to select it.

It's almost impossible to work with CKEditor5 on my mobile device, so a fix would be more than appreciated!

@wimleers
Copy link

Also reported against Drupal: https://www.drupal.org/project/drupal/issues/3417978#comment-15420910

@Witoso Witoso added package:typing domain:typing/ime This issue reports a problem with standard typing & IME (typing method for CJK languages). and removed pending:feedback This issue is blocked by necessary feedback. labels Feb 1, 2024
@dtdesign
Copy link

dtdesign commented Feb 5, 2024

@lazar2038 Can you please confirm that the behavior in step 4 really results in “zxz” and not ”zzx”? Everything else strongly suggests that this is in fact a duplicate of #14567?

From my experience after debugging that issue, “zzx” makes no sense because the single letter duplication is caused by the selection effectively off-by-one. In combination with the composition behavior on Android this causes the replacement to be slightly off which causes a leftover character to appear to the right of the caret.

@WItso Point 4 is the only difference to #14567, if the user confirms that they really meant to write “zxz” as the result, then this is definitely a duplicate.

@lazar2038
Copy link
Author

@lazar2038 Can you please confirm that the behavior in step 4 really results in “zxz” and not ”zzx”? Everything else strongly suggests that this is in fact a duplicate of #14567?

My mistake. Step 4 results in "zzx".

@dtdesign
Copy link

dtdesign commented Feb 5, 2024

@lazar2038 You just wrote exactly what is written in your initial description which is a bit confusing when you start with “My mistake”. I’m sorry to bother you, but I’m not sure if I’m just dumb here! ;-)

You wrote: Step 4 results in zzx

Following my observations it should result in zxz. Can you confirm that it actually results in zxz?

@lazar2038
Copy link
Author

@lazar2038 You just wrote exactly what is written in your initial description which is a bit confusing when you start with “My mistake”. I’m sorry to bother you, but I’m not sure if I’m just dumb here! ;-)

You wrote: Step 4 results in zzx

Following my observations it should result in zxz. Can you confirm that it actually results in zxz?

Oh. My mistaken mistake.

The result is definitely "zzx". The first letter of every word except first word is cloned.
Video showing this case: https://www.youtube.com/shorts/XkO4t9AEGDQ

@lazar2038
Copy link
Author

My mistaken mistake, i understood you incorrectly.

Yes, the result is definitely "zzx".
I attach video showing the case: https://www.youtube.com/shorts/Srbb4bc01cE

@dtdesign
Copy link

dtdesign commented Feb 5, 2024

Thanks for taking your time to clarify it! So this is actually a different issue to the one I was having my luck with.

@dtdesign
Copy link

dtdesign commented Feb 10, 2024

@lazar2038 I did some more testing and found somewhat of a fix that addresses a lot of problems that occur around spaces. My latest attempt is included at the end of #13994 (comment), it requires manually patching the source to incorporate the change, even hot patching the renderer.js in node_modules would work.

Considering everything I have learned so far, I am somewhat confident that it solves your issue. Would love to hear some feedback from you if you can spare the time! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:mobile This issues reports a problem related to a mobile environment. domain:typing/ime This issue reports a problem with standard typing & IME (typing method for CJK languages). package:typing type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

5 participants