Opened 11 years ago

Closed 11 years ago

#3112 closed Bug (fixed)

Duplicate DOM event handlers are registered in IE.

Reported by: Martin Kou Owned by: Martin Kou
Priority: Must have (possibly next milestone) Milestone: CKEditor 3.0
Component: General Version: SVN (FCKeditor) - Retired
Keywords: IE Review+ Cc:

Description

To reproduce:

  1. Open replacebyclass.html.
  2. Type the following code in the URL bar:
    javascript: void((f=function(){alert('hi!');},body=CKEDITOR.document.getBody(),body.on('click',f)));
    
  3. Click on the document body, you should see the message "hi!" appear once.
  4. Now remove the event handler with the following code in the URL bar:
    javascript: void(body.removeListener('click',f));
    
  5. Click on the document body, you should no longer see the "hi!" message.
  6. Add the same event handler back to the document body.
    javascript: void(body.on('click',f));
    
  7. Click on the document body.
  8. Now you have 2 "hi!" messages - the previous event handler wasn't really removed!

This issue is blocking #3074.

Attachments (1)

3112.patch (538 bytes) - added by Martin Kou 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by Martin Kou

Attachment: 3112.patch added

comment:1 Changed 11 years ago by Martin Kou

Keywords: Review? added

domobject.js is calling detachEvent() in IE without adding the 'on' prefix in the event name, and so it did't really remove the event handler.

comment:2 Changed 11 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:3 Changed 11 years ago by Martin Kou

Resolution: fixed
Status: newclosed

Fixed with [3197].

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy