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

fix paste of clipboard content #2272

Closed
wants to merge 1 commit into from
Closed

Conversation

jcppman
Copy link

@jcppman jcppman commented Jun 10, 2015

closes #2270

use copiedStyle only if the pasted content source is copiedText.

use `copiedStyle` only if the pasted content source is `copiedText`
@asturur
Copy link
Member

asturur commented Jun 11, 2015

Please, i cannot reproduce it on kitchensink.
Could you please tell me where did you found the bug
version of fabricjs ( number or if you pulled github ) and browser used. ( and version )

@jcppman
Copy link
Author

jcppman commented Jun 11, 2015

Hi, I'm using the master branch, latest commit: 2d38f9e

Environment

  • Chrome 43
  • Firefox 38
  • Safari 8

OS: Mac OSX

Steps:

  1. copy url from browser's address bar
  2. open kitchensink
  3. double-click an IText and paste

To reproduce the bug, make sure you don't copy anything from IText before, otherwise even if you copy anything from other places which doesn't set this.copiedStyles, previous value is still there.

So it means that in current master branch, in order to make paste of an IText work, user has to copy a value from itself frist.

@asturur
Copy link
Member

asturur commented Jun 11, 2015

ok i ll check it as priority and see where the problem came from.

@jcppman
Copy link
Author

jcppman commented Jun 11, 2015

Thank you for the quick response :)

The problem comes from _insertStyles cuz in insertChars we pass a true to use copiedStyle but in this scenario it is undefined.

This PR is confirmed to fix this problem on all browsers I tried but I don't have any tablet so this part need to be comfirmed

@asturur
Copy link
Member

asturur commented Jul 14, 2015

@kangax this is fine, you should merge this.

@asturur
Copy link
Member

asturur commented Jul 14, 2015

need to resubmit with additional fix

@asturur asturur closed this Jul 14, 2015
@asturur asturur mentioned this pull request Jul 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[IText] paste is broken when content is plaintext
2 participants