Opened 16 years ago
Closed 16 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:
- Open replacebyclass.html.
- Type the following code in the URL bar:
javascript: void((f=function(){alert('hi!');},body=CKEDITOR.document.getBody(),body.on('click',f)));
- Click on the document body, you should see the message "hi!" appear once.
- Now remove the event handler with the following code in the URL bar:
javascript: void(body.removeListener('click',f));
- Click on the document body, you should no longer see the "hi!" message.
- Add the same event handler back to the document body.
javascript: void(body.on('click',f));
- Click on the document body.
- Now you have 2 "hi!" messages - the previous event handler wasn't really removed!
This issue is blocking #3074.
Attachments (1)
Change History (4)
Changed 16 years ago by
Attachment: | 3112.patch added |
---|
comment:1 Changed 16 years ago by
Keywords: | Review? added |
---|
comment:2 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|
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.