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

UploadImage Plugin Widgets not working in IE, Opera, Safari, PhantomJS #641

Closed
b2m opened this issue Jul 12, 2017 · 6 comments · Fixed by #4666
Closed

UploadImage Plugin Widgets not working in IE, Opera, Safari, PhantomJS #641

b2m opened this issue Jul 12, 2017 · 6 comments · Fixed by #4666
Assignees
Labels
plugin:uploadimage The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:bug A bug.
Milestone

Comments

@b2m
Copy link

b2m commented Jul 12, 2017

Are you reporting a feature or a bug?

Bug

Check if the issue is already reported

None found

Provide detailed reproduction steps (if any)

  1. Use the Inline Editor (http://sdk.ckeditor.com/samples/inline.html).
  2. Use an id with commas for the editor div (id="introduction,first", valid in HTML 5 https://www.w3.org/TR/html5/dom.html#the-id-attribute).
  3. Try uploading an image using Drag & Drop or via paste with embeded base64 image.

Reproduction steps in CKEditor test:

  1. Use test: /tests/plugins/uploadwidget/manual/image.md on Safari or other mentioned browser.
  2. Edit file: /tests/plugins/uploadwidget/manual/__template__.html with followed things:
  • HTML: change textarea into div and add contenteditbale="true"
  • HTML: change id to edito,r1 (something with comma)
  • SCRIPT: change CKEDITOR.replace into CKEDITOR.inline, add in config extraPlugin: floatingspace, modify name to edito,r1.
  1. Try drag and drop image into editor.
  2. Optional, if you wish to test it on Chrome: overwrite CSS.escape. Before initializing of editor in point 2 add CSS.escape = undefiend

Expected result

Image is uploaded and inserted into editor.

Actual result

Image is uploaded but not inserted into editor.

Other details

Deeper analysis

The reason is the usage of the experimental window.CSS.escape feature (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape) that is used to generate CSS selectors to identify CKEditor Widgets. You might enhance the alternative escaping in CKEDITOR.tools.escapeCSS` to also escape commas.

@msamsel
Copy link
Contributor

msamsel commented Jul 13, 2017

Hi,

I'm not able to reproduce problematic situation. I test it on Safari on MacOS with this code: https://codepen.io/anon/pen/JJxNeE?editors=1010. I use image widget to insert picture to editor. And I'm able to resize it properly.
Can you describe how exactly you resize image so widget has problem? I'll appreciate, if you could also provide some test code, where you was able to see this problem.

@b2m
Copy link
Author

b2m commented Jul 14, 2017

Can you describe how exactly you resize image so widget has problem?

Sry I messed up my notes before writing the issue: resizing and moving is not a problem. The problem was inserting images via Drag&Drop and from paste content (base64). I will give codepen a try to generate a reproducible example.

@msamsel
Copy link
Contributor

msamsel commented Jul 14, 2017

Don't worry ;) I wait for further description then.
BTW can you check this issue: #643, maybe it covers your problem?

@b2m
Copy link
Author

b2m commented Jul 19, 2017

Checked #643 but this is something more delicate.

As promised a codepen simulating the problem of missing CSS.escape capabilities and Editor ids with ,: https://codepen.io/anon/pen/JJQpjv?editors=1010

The test simulates pasting HTML content with a base64 encoded image into the editor.

@msamsel
Copy link
Contributor

msamsel commented Jul 20, 2017

Thank you for the example it allowed to reproduce the issue.
I'll modify your description with information how reproduce this error in our tests.
I hope it is described well if not, then please feel free to add more comment to it.

@sculpt0r
Copy link
Contributor

Closed with: #4666

@f1ames f1ames added this to the 4.16.2 milestone Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin:uploadimage The plugin which probably causes the issue. 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.

4 participants