Ticket #996 (closed Bug: fixed)

Opened 15 months ago

Last modified 15 months ago

OnPaste listeners get executed twice

Reported by: fredck Owned by: fredck
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: General Version: SVN
Keywords: Confirmed Cc:

Description

When defining an OnPaste listener inline in the page, the target function get executed twice. It has been tested with IE7 only.

Steps to Reproduce

1. Insert the following code at the top of sample01.html:

<script type="text/javascript">

function FCKeditor_OnComplete( editorInstance )
{
	editorInstance.Events.AttachEvent( 'OnPaste', myPasteListener ) ;
}

var myCounter = 0 ;

function myPasteListener( editorInstance )
{
	var textHtml = editorInstance.GetClipboardHTML() ;

	window.top.document.title = ++myCounter ;

	editorInstance.InsertHtml( textHtml.toLowerCase() ) ;

	return false ;
}
</script>

2. Open the page and try to paste. Note that the data is pasted twice, and the counter steps two numbers in the window title bar.

Change History

Changed 15 months ago by fredck

  • status changed from new to closed
  • resolution set to fixed

Fixed with [587].

Click here for more info about our SVN system.

Changed 15 months ago by fredck

  • milestone set to FCKeditor 2.5
Note: See TracTickets for help on using tickets.