-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Safari] The first line of each paragraph cannot be input into Chinese #1333
Comments
Hello, when can I repair it? @Reinmar |
Hi! Which input mode (language and keyboard) do you use precisely? I've been able to reproduce some very weird issues with "Pinyin - Simplified" but only in Safari (it worked fine in Chrome). Do you confirm this?
Those are very complicated issues and I can't even tell you where to start debugging it. |
Hello, @Reinmar ,I know how to solve this problem, but I don't know how to modify the code. Listening for input events in text input boxes triggers input events when spelling Chinese characters (input method) but Chinese characters are not actually filled into text boxes (selected words), as shown in Figure 1: Terms of settlement:After the completion of the selection, the input event is triggered, triggering only once.
|
@gongzhiq I think this is a ckeditor bug , whatever use which input method . I guess ckeditor process content immediately when input event triggered. |
@xinglie Yes, I think so too. It's a problem when the first paragraph of the text starts typing. It doesn't wait for the Pingyin input to complete, and then it processes the input. |
@Reinmar Hello, this problem may be widespread. It's not only the Chinese input problem, but also the input method in other countries. I can help solve it. |
I'm trying to understand one thing first – the bug was reported for Safari only. I can't reproduce any issue on other browsers (works fine in Chrome and Firefox). Nor, with other languages (checked Hiragana and Korean. Do you confirm that or are we talking about different issues? Regarding debugging:
How it works is:
Unless... we're talking about composition. Here it's far more tricky. We can't be doing step 4. during composition because touching the DOM means breaking the composition. That's most likely what happens in this case. So what we do? We listen to composition events and don't do unsafe changes when the composition is taking place. But currently, that's just in one place: https://github.com/ckeditor/ckeditor5-typing/blob/master/src/utils/injectunsafekeystrokeshandling.js#L45 Most likely, there's some other change in the model/view which should not happen in the case that's broken for Chinese. My guess would be – the The Ticket regarding blocking block filler removal during composition: https://github.com/ckeditor/ckeditor5-engine/issues/1353 It'd be first good to make sure that it's the removal of that |
hi, @Reinmar ,Thank you very much for your answer. Yes, this question only exists in Safari.The above answer is very reasonable. Can we repair it according to the above statement? |
Sure. But what I wrote is just the basics of this entire system, so I didn't even mention how the solution could look like. I just don't know without digging deep into this. Anyway, the first thing to do is understanding at what stage the composition gets broken. To do that you need to debug step by step what happens in the renderer after keys are pressed. |
hi, @Reinmar This is the change of HTML when entering. I don't know how to debug code, can I give a debug step? |
@275208060 It has been confirmed as another issue: https://github.com/ckeditor/ckeditor5-typing/issues/149 |
I'm afraid that since we had to revert the patch, this issue is still present. More details here: #4533 (comment). |
I'm getting different results in manual tests and in editors from docs or online builder. I could not locate the difference in those editors that could cause this. Manual tests (all-features, article or table)
Docs or online builder
(In first table cell I typed |
#8759 was marked as a duplicate of this issue. |
Does this problem had been solved? |
大哥,这个问题你解决了吗?我看官网demo上没有这个问题了 |
@ckeditor/qa-team, could you retest this issue? |
@Reinmar I can't reproduce it on Safari on docs, nor manual test nor ckeditor.com website: |
I'm closing it., as it is no longer reproducible. |
Is this a bug report or feature request? (choose one)
🐞 Bug report
💻 Version of CKEditor
ckeditor5 v11.1.1 classic editor build (latest version)
📋 Steps to reproduce
use Safari Browser
Edition 12.0.1 (13606.2.104.1.2)
The text was updated successfully, but these errors were encountered: