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

Arabic text pasted incorrectly #848

Closed
mmichaelis opened this issue Aug 31, 2017 · 7 comments · Fixed by #4239
Closed

Arabic text pasted incorrectly #848

mmichaelis opened this issue Aug 31, 2017 · 7 comments · Fixed by #4239
Assignees
Labels
browser:chrome The issue can only be reproduced in the Chrome browser. browser:safari The issue can only be reproduced in the Safari browser. status:confirmed An issue confirmed by the development team. type:bug A bug.
Milestone

Comments

@mmichaelis
Copy link

Are you reporting a feature request or a bug?

Bug

Check if the issue is already reported

none found

Provide detailed reproduction steps (if any)

  1. Paste the following text twice to CKEditor in Chrome:

    عام

Expected result

Characters are "bound" to:

عامعام

Actual result

Characters are not bound and showing as:

عام عام

(space inserted just because the GitHub editor does fine here)

Other details

  • Browser: Chrome (it works for Firefox and IE)
  • OS: Windows 10
  • CKEditor version: 4.7.2 (tested at https://ckeditor.com/)
  • Works for Chrome for example here:
  • Assumption is, that RTL does not work in CKEditor in Chrome as also the cursor navigation direction is wrong comparing Chrome to IE, Firefox, Edge
@msamsel msamsel added status:confirmed An issue confirmed by the development team. type:bug A bug. labels Sep 4, 2017
@msamsel
Copy link
Contributor

msamsel commented Sep 4, 2017

I was able to confirm it.
Short inspections shows that after paste there appear 2 separate text nodes under paragraph which are not merged together.
After re-creating editable, they are merged (opening sourcearea and wysiwygarea again).

@mlewand mlewand added the browser:chrome The issue can only be reproduced in the Chrome browser. label Sep 7, 2018
@mlewand mlewand changed the title Chrome: Arabic text pasted incorrectly Arabic text pasted incorrectly Sep 7, 2018
@mmichaelis
Copy link
Author

Just tested with CKEditor 5. This issue is fixed there.

@owenpm
Copy link

owenpm commented Jul 28, 2020

I was able to reproduce in the CKEditor 4 example as well as on our site. We're using 4.14.0 on Drupal 8. If we delete a character in the middle of a word, we essentially have to rewrite the word so the binding happens correctly as stated above. It is fixed in CKEditor 5, but it sounds like that's a big move for Drupal and not likely to happen soon.

@owenpm
Copy link

owenpm commented Aug 11, 2020

Is there any way for us to assist or help out with a fix for this? Or any way to point us in the right direction? We're not able to upgrade to CKEditor 5.

ghost pushed a commit to jidrone/ckeditor4 that referenced this issue Sep 7, 2020
ghost pushed a commit to jidrone/ckeditor4 that referenced this issue Sep 8, 2020
@f1ames
Copy link
Contributor

f1ames commented Sep 17, 2020

There is already PR in place #4239. It requires adding tests (see #4239 (comment)) and checking if it doesn't break anything (especially other IMEs).

@f1ames
Copy link
Contributor

f1ames commented Sep 17, 2020

I checked how it behaves without clipboard plugin as I had some suspicions it might be the cause of this issue, but the effect is the same without it (see https://codepen.io/f1ames/pen/LYNJQGZ).

However, it doesn't also work with native contenteditable=true (however works with textarea), which means this may be Blink/Webkit upstream issue (see https://codepen.io/f1ames/pen/MWyqQJM).

I will take a look if there are any upstream issues reported 🤔

Ok, this was caused by the fact that I copied Arabic text from the initial issue description where it was inside the blockquote which changes the paste behavior:facepalm: And so, this works fine in native textarea and contenteditable="true" (see https://codepen.io/f1ames/pen/MWyqQJM and https://codepen.io/f1ames/pen/jOqvjgy).

As for CKEditor 4 without clipboard and undo plugins (see https://codepen.io/f1ames/pen/LYNJQGZ) it still doesn't work there which means this is a core issue and proposed fix and it's placement in the code makes sense 👍

@f1ames f1ames self-assigned this Sep 18, 2020
@Comandeer Comandeer added the browser:safari The issue can only be reproduced in the Safari browser. label Sep 22, 2020
@CKEditorBot
Copy link
Collaborator

Closed in #4239

@CKEditorBot CKEditorBot added this to the 4.15.1 milestone Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser:chrome The issue can only be reproduced in the Chrome browser. browser:safari The issue can only be reproduced in the Safari browser. status:confirmed An issue confirmed by the development team. type:bug A bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants