Wysiwyg-editor: safari paste.afterCleanup

Created on 29 Mar 2017  路  4Comments  路  Source: froala/wysiwyg-editor

Expected behavior.
  1. copy any html based text on safari
  2. paste it inside froala editor on safari
  3. paste.afterCleanup event is called once with the correct parameters
Actual behavior.
  1. copy any html based text on safari
  2. paste it inside froala editor on safari
  3. paste.afterCleanup event is called twice. One with the correct parameters and the other one get an event instead of clipboard_html
Steps to reproduce the problem.
  1. copy any html based text in safari
  2. go to the full featured demo
  3. attach paste.afterCleanup events that prints out the clipboard_html
    ( $('#froala-editor').on('froalaEditor.paste.afterCleanup',(e,editor,clipboard_html)=> console.log(clipboard_html));)
  4. paste the html text
OS.

OSX Sierra

Browser.

safari Version 10.0.3 (12602.4.8)

bug

Most helpful comment

still happening with version 2.7.3, In Chrome - sometimes clipboard_html have event instead of "clipboard_html"
@stefanneculai

All 4 comments

This is reproducible on safari on the homepage editor: https://www.froala.com/wysiwyg-editor
If you attach event handlers in the console:
$('#froala-editor').on('froalaEditor.paste.afterCleanup', (e,editor,clipboard_html)=> console.log(clipboard_html));

And copy something from within the editor (or another safari tab) and paste it in the editor. The paste.afterCleanup is fired twice, once with the clipboard_html set to Event(..) and the second time with the actual html:

screen shot 2017-03-30 at 12 01 17 pm

still happening with version 2.7.3, In Chrome - sometimes clipboard_html have event instead of "clipboard_html"
@stefanneculai

@pawansingh-snapwiz could you please use this basic jsFiddle to highlight the problem? Thank you in advance.

Event gets fired twice when pasting html based content. First time with jQuery event, second time with pasted html.

Event gets fired once with jQuery event when pasting image.

https://jsfiddle.net/rbf6n9yx/1/

Windows 10
Chrome 73.0.3683.103 (64 bits)
Firefox 66.0.3 (64 bits)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thedotedge picture thedotedge  路  4Comments

CrazyClicker picture CrazyClicker  路  4Comments

archonic picture archonic  路  4Comments

Krisell picture Krisell  路  3Comments

rogersteblerbsi picture rogersteblerbsi  路  3Comments