[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.epf] Re: Re-using RichText and RichTextEditor

Note that this bug has been fixed. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=205927
and the related bug to make the RichText component available as a stand-alone feature: https://bugs.eclipse.org/bugs/show_bug.cgi?id=209373


Eric


Robs wrote:
Hello Phillip,

i had the same problem. I solved it by commenting setFocus() in the ActivateListener. This listener is located in RichText.java in the method addListeners(). It's the second listener for the editorControl:

...
protected void addListeners()
{
this.editorControl = getControlSite( this.editor );
if ( this.editorControl != null )
{
if ( this.debug )
{
printDebugMessage( "init", "editorControl=" + this.editorControl.getClass().getName() ); //$NON-NLS-1$ //$NON-NLS-2$
}


this.editorControl.addListener( SWT.Activate, new Listener()
{
public void handleEvent( final Event event )
{
if ( RichText.this.debug )
{
printDebugMessage( "activateListener" ); //$NON-NLS-1$
}
// setFocus causes the RichText in the dialog to flicker. // The reason for it was that it got and lost focus the whole time.
// commented the line -> fixed!
// setFocus();
notifyListeners( SWT.Activate, event );
}
} );
....


Hope that helps.
Robert



Eric Rizzo wrote:

Another follow-up as I progress towards using RichTextEditor in
non-EPF plugins:

If I place a RichTextEditor in a JFace Dialog, there is an anomaly
when
switching from the HTML tab to the Rich Text tab. If the cursor is in
the edit window when selecting the Rich Text tab, the dialog flashes
many times and eventually pops up an Internet Explorer error dialog
that
says "Stack overflow at line: 0."
This happens regardless of the contents of the rich text or HTML edit
components.
I suspect some kind of incompatibility between the rte.js and placing
the editor in a modal dialog, but am not sure how to proceed.

Any help appreciated,
Eric
I found the same problem.  Not sure either!

PB.