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

Support for Clipboard API in Edge #468

Closed
Comandeer opened this issue Jun 5, 2017 · 12 comments
Closed

Support for Clipboard API in Edge #468

Comandeer opened this issue Jun 5, 2017 · 12 comments
Assignees
Labels
browser:edge The issue can only be reproduced in the Edge (edgeHTML engine based) browser. plugin:clipboard The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:task Any other issue (refactoring, typo fix, etc).
Milestone

Comments

@Comandeer
Copy link
Member

Are you reporting a feature or a bug?

Task

Check if the issue is already reported

http://dev.ckeditor.com/ticket/16994

Description

New Edge 15 ​implemented Clipboard API, so it will be nice to switch from our pastebin to real API in this browser.

Note however that users report some errors (see comments in the linked thread).

Other details

  • Browser: Edge 15+
  • OS: Windows 10
@Comandeer Comandeer added browser:edge The issue can only be reproduced in the Edge (edgeHTML engine based) browser. status:confirmed An issue confirmed by the development team. type:task Any other issue (refactoring, typo fix, etc). labels Jun 5, 2017
@Comandeer Comandeer self-assigned this Jun 5, 2017
@mlewand mlewand added the plugin:clipboard The plugin which probably causes the issue. label Jun 16, 2017
@Comandeer
Copy link
Member Author

After some initial research, it seems that Edge really supports the Clipboard API – pasting works flawlessly.

There are however still some issues connected with cutting and copying from editor. If user cuts/copies using a button in the toolbar, then editor reports that cut was unsuccessful. Despite this notification, text is removed from editor and copied to the clipboard. Pasting however results in pasting as plain text (even if cut/copied text contained some rich content). It seems like an issue with editor itself (as our current clipboard integration has lot of logic dedicated to Edge/IE) as "pure" [contenteditable] works as intended.

@mlewand
Copy link
Contributor

mlewand commented Jun 27, 2017

I have commented in MS Dev Feedback the following:

@PiotrekKoszulinski looks that Edge will not stack multiple mime types added with setData.

I have prepared a small demo, where you can play around with it: https://codepen.io/mlewand/pen/MoEMzX

Currently if you change the order of setData() in paste listener, it will put either text/html or plain text into the clipboard but not both.

So it breaks copying experience.

@mlewand
Copy link
Contributor

mlewand commented Jun 27, 2017

Actually it has been tracked here: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11780845/

Seems that the issue has been fixed, so we need to wait for the new Edge release to verify if the issue got fixed.

@mlewand
Copy link
Contributor

mlewand commented Jun 29, 2017

I checked preview version of Edge 16.16215 and it's not yet fixed there. So we still need to wait a bit.

@f1ames
Copy link
Contributor

f1ames commented Aug 23, 2017

Checked on Edge preview 16.16257 using https://jsfiddle.net/6uwnad3f/1/ demo. Looks like it is fixed there already 🎉

@johnfall
Copy link

johnfall commented Sep 4, 2017

Great news!

@f1ames f1ames assigned f1ames and unassigned Comandeer Sep 20, 2017
@mlewand
Copy link
Contributor

mlewand commented Sep 20, 2017

@f1ames Some preparation were made on t/468 branch. Make sure to reuse it if possible for further investigation.

@f1ames
Copy link
Contributor

f1ames commented Sep 21, 2017

Edge (tested in 16 preview) still does not support custom mime types for dataTransfer.setData (upstream issue: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8007622/).

@mlewand
Copy link
Contributor

mlewand commented Sep 25, 2017

@f1ames FYI Microsoft is looking to publish Win10 Creators Update on October 17th. I guess that's when the new Edge version will go stable, we should keep an eye on that.

@Reinmar
Copy link
Member

Reinmar commented Oct 2, 2017

I can't confirm that setting two+ different mime types is correctly handled in Edge 16. From what I saw they only changed the order and now the first setData() call works. I was using this sample to test: https://jsfiddle.net/pmrkwt9r/1/.

@f1ames
Copy link
Contributor

f1ames commented Oct 2, 2017

@Reinmar, hmmm, that's weird. I checked your demo on Edge 16 (Microsoft Edge 41.16257.1000.0; Microsoft EdgeHTML 16.16257) and seems to be working fine:

oct-02-2017 11-13-42

One noticeable thing, is that during like 20 minutes of testing I encountered few cases where one of the mime types was not set correctly (empty) as you mentioned. However, it was not reproducible in a next try, looks like the API is not fully stable...

@Reinmar
Copy link
Member

Reinmar commented Oct 2, 2017

TBH, I'm not even surprised. When testing yesterday I had a couple of issues – also including some errors thrown on copy ;| Could you post your comment to the issue on MS's issue tracker – this may help them debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser:edge The issue can only be reproduced in the Edge (edgeHTML engine based) browser. plugin:clipboard The plugin which probably causes the issue. status:confirmed An issue confirmed by the development team. type:task Any other issue (refactoring, typo fix, etc).
Projects
None yet
Development

No branches or pull requests

5 participants