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. |
| 1 | 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. |
| 2 | |
| 3 | === Functonal TestCase === |
| 4 | Tested with ''test-events-duplicate.path'' |