#2927: CKEDITOR.event duplicate dom event registration
-----------------------+----------------------------------------------------
 Reporter:  garry.yao  |       Owner:  garry.yao   
     Type:  Bug        |      Status:  assigned    
 Priority:  High       |   Milestone:  CKEditor 3.0
Component:  General    |     Version:  SVN         
 Keywords:  Confirmed  |  
-----------------------+----------------------------------------------------

Old description:

> Dom event delegation registration is currently incorrect, if the
> specified event were registered twice, the listener function suffer from
> duplicate invocation.
> Reproduce Steps:
>  1. Open one editor page in FF
>  1. Execute the following codes through console:
> {{{
>         var body = CKEDITOR.document.getBody();
>         body.on('click', function(){
>                 alert('first');
>         });
>         body.on('click', function(){
>                 alert('another');
>         });
> }}}
>  1. Every listener was invoked twice.

New description:

 Event delegation registration with '''CKEDITOR.event.implementOn'''is
 currently incorrect, when this method is invoked on '''prototype''' object
 of a constructor, then instances of this constructor will share the same
 private '''_.events''' model, which is wrong. This would result in
 duplicate  invocation of event listeners from two different object.

 === Functonal TestCase ===
 Tested with ''test-events-duplicate.path''

--

Comment(by garry.yao):

 Reduced reason was found, update description accordingly.

-- 
Ticket URL: <http://dev.fckeditor.net/ticket/2927#comment:2>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac

Reply via email to