Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DoubleClick event not fired in RichTextEditor item body

    Hi,

    There are two items in the following form example: RichTextEditorItem and TextAreaItem.

    The form has DoubleClick handler attached. The event is fired when clicked on TextAreaItem, but not when cursor is over body of RichTextEditorItem. Also, the event handler attached to RichTextEditorItem itself is ignored.

    See attached code example:

    Code:
    package pl.com.tech4.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.events.DoubleClickEvent;
    import com.smartgwt.client.widgets.events.DoubleClickHandler;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.fields.RichTextItem;
    import com.smartgwt.client.widgets.form.fields.TextAreaItem;
    
    public class MainEntryPoint implements EntryPoint {
    
        public void onModuleLoad() {
    
            layout();
        }
    
        private void layout() {
            DynamicForm form = new DynamicForm();
            form.addDoubleClickHandler(new DoubleClickHandler() {
                @Override
                public void onDoubleClick(DoubleClickEvent event) {
                    SC.logWarn("onDoubleClick", "form");//<-- not fired in richEditor body
                }
            });
            RichTextItem richTextItem = new RichTextItem();
            richTextItem.addDoubleClickHandler(new com.smartgwt.client.widgets.form.fields.events.DoubleClickHandler() {
                @Override
                public void onDoubleClick(com.smartgwt.client.widgets.form.fields.events.DoubleClickEvent event) {
                    SC.logWarn("onDoubleClick", "richTextItem");//<-- not fired either
                }
            });
            TextAreaItem textAreaItem = new TextAreaItem();
            textAreaItem.setShowTitle(false);
            form.setFields(richTextItem, textAreaItem);
            form.draw();
        }
    }
    Thanks,

    MichalG
    ps
    SmartClient Version: v12.0p_2018-05-18/LGPL Development Only (built 2018-05-18)
    Last edited by michalg; 19 Oct 2018, 02:13. Reason: SGWT version added

    #2
    We've added support for propagating click() and doubleClick() from the RTE's iframe - you can catch them at RichTextCanvas, RichTextEditor and RichTextItem levels.

    Please retest with a build dated October 25 or later.

    Comment


      #3
      Verified in RichTextItem using 12.0p October 25 version.
      Thanks,
      MichalG

      Comment

      Working...
      X