Minor / trivial bug in CodeEditorComponent


#1

Hi Jules,

Here is a trival bug for you. When creating a CodeEditorComponent and using the new feature .setReadOnly, the popup menu still displays Cut, Delete, Paste, Undo and Redo. I guess you just need to modify addPopupMenuItems to correctly list (or set active) the functions that should / would work.

Of course all of the member functions that are triggered by these commands don't allow the document to be modified. So therefore this is a minor bug with no loss/modification of data and ther is an easy workaround by overriding the popup menu implemenation. 

Another small question, is it by design to keep the Caret in the view when in read only? I'm just wondering because my first inclination when using the component was that the Caret should be hidden, as it is when you set a TextEditor in readonly.

Best regards,

Jim

 


#2

Thanks - good point, the caret shouldn't have been visible, and I've sorted the menus out now.