Upgraded from 4.2.1 to 4.3 and my drodown menu buttons stopped working when the editor was put into Source mode. I've tracked down the code where the logic breaks.
located in selection.js where getSelection() is added to prototype, the line of code
return editable && this.mode == 'wysiwyg' ? new CKEDITOR.dom.selection( editable ) : null;
is returning null. There is some slight differences in this method that differ from 4.2.1. It appears that 4.3 added a check that verifies if the editor is in wysiwyg mode. if not then a null is returned therefore causing the onShow() method to fail in the menu class where selection.getStartElement() is called. selection is null.
Is this a bug?
Has anyone else experienced this and have a fix?
Please Advise
Thank You
tsutaz

Hi, maybe you have just to
Hi, maybe you have just to add a line to the plugin like:
editor.ui.addRichCombo('somesupercombo', {
label : lang.personalisation,
title : lang.personalisation,
modes : { wysiwyg: 1, source: 1 },
...
Thank you for your response
Thank you for your response and Yes I have added the "modes" to my menu however, I'm not using a richcombo, rather a menubutton.
RichCombo could possibly work but I have not found a way to add an icon on the toolbar button. I'm assuming that an icon could be possibly added on each rich combo selection???
From what I understand, this
From what I understand, this was never possible. A few buttons work but dropdowns were never designed to work in source. It probably worked in CKEditor 4.2.1 because of some third-party plugins or modified code in core.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Repectfully, it was possible
Repectfully, it was possible and we are/were actively using it for multiple dropdown options while the editor is in source mode. To use dropdown buttons is a requirement that we must have wether in source or wysiwyg mode. As I originally stated in my initial post, please looked at Selection.js (version 4.3.1) specifically in method getSelection(), it is line 801. The code validates if the editor is in wysiwyg mode. This specific check was not coded in 4.2.1 and now prohibits our buttons from working, were kinda stuck until we can figure out the best approach to fix this.
While this was never intended to work (by your design) what advice could you give me to easily re-implement? We "really" do not want to change or alter an CKEditor specific code. A custom plugin might be a solution, but the code that breaks us is not located where a plugin could be implemented.
Thank you for help and cooperation.
This is a confirmed bug
please see link:
http://dev.ckeditor.com/ticket/11490
Thank You