Changes between Initial Version and Version 2 of Ticket #2927


Ignore:
Timestamp:
Mar 2, 2009, 7:09:21 AM (16 years ago)
Author:
Garry Yao
Comment:

Reduced reason was found, update description accordingly.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2927

    • Property Keywords Confirmed added
    • Property Owner set to Garry Yao
    • Property Status changed from new to assigned
  • Ticket #2927 – Description

    initial v2  
    1 Dom event delegation registration is currently incorrect, if the specified event were registered twice, the listener function suffer from duplicate invocation.
    2 Reproduce Steps:
    3  1. Open one editor page in FF
    4  1. Execute the following codes through console:
    5 {{{
    6         var body = CKEDITOR.document.getBody();
    7         body.on('click', function(){
    8                 alert('first');
    9         });
    10         body.on('click', function(){
    11                 alert('another');
    12         });
    13 }}}
    14  1. Every listener was invoked twice.   
     1Event 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.
     2
     3=== Functonal TestCase ===
     4Tested with ''test-events-duplicate.path''
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy