Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#9622 closed Bug (fixed)

IE Bug (Source Mode more then one instance)

Reported by: David Norris Owned by: Piotrek Koszuliński
Priority: Normal Milestone: CKEditor 4.0
Component: UI : Source View Version: 4.0
Keywords: Cc:


This may be a bit picky but is pretty annoying (Only does it in IE) If I have one instance which has source mode on, then go to another instance and switch to source and back to wysiwyg it locks up.

Change History (7)

comment:1 Changed 9 years ago by David Norris

Version: 4.0 Beta4.0 (GitHub - master)

comment:2 Changed 9 years ago by Jakub Ś

Keywords: IE Source Mode removed
Status: newconfirmed

Reproducible in all versions of IE in CKE 4.x (v4).

  1. Use autogrow sample
  2. In first editor set startupMode : 'source',
  3. Open page.
  4. In second editor switch to source and back.

Result: JS error pops up
Message: 'this.editor' is empty or undefined (no property fire)
Line: 91
URI: /ckeditor4/plugins/sourcearea/plugin.js

comment:3 Changed 9 years ago by Piotrek Koszuliński

Milestone: CKEditor 4.0
Owner: set to Piotrek Koszuliński
Status: confirmedassigned

comment:4 Changed 9 years ago by Piotrek Koszuliński

Status: assignedreview

I pushed t/9622 with patch fixing this issue.

Though, I think that the real issue may be somewhere else and it may be a conceptional problem. Error was caused by exception thrown in editable#clearListeners(), because there was one listener function (onReady from sourcearea plugin) bound twice (once for each editor) to one window object for one event. Event class is not able to remove such a listener by the listener#removeListener() method. Now the question is - shouldn't event#on() yield in this case? Or handle it by wrapping listener, allowing the same to attach two?

Also, I want to share a conclusion - empty try{}catch{} obfuscates the code and I'll repeat this again - we should avoid it as much as possible. 90% of debugging time was before I found empty try-catch inside editable#clearListneres() and what happens there.

comment:5 Changed 9 years ago by Garry Yao

Status: reviewreview_passed

comment:6 Changed 9 years ago by Piotrek Koszuliński

Resolution: fixed
Status: review_passedclosed

Masterised: git:2604da7

comment:7 Changed 9 years ago by David Norris

Good luck to you and your team, can't wait to see the final version!!

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