Announcement

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

    Issues with RichTextItem

    Hi,

    I have added a RichTextItem as my grid editor customizer for a field, but am running into a few issues. I am using SmartGWT version 6.1, and it is a TreeGrid (not sure if this matters).

    1. The edit link button reads as "Untitled Button" (see screenshot). I want it to have no visible text and just the icon, like in previous SmartGWT versions.

    2. When I press on the horizontal scrollbar, it dismisses the editor instead of letting me scroll.

    Do you know how I can fix these issues, or can you work on a solution? Thanks.

    Relevant code:

    Code:
     scheduleGrid.setEditorCustomizer(new ListGridEditorCustomizer() {
    
                @Override
                public FormItem getEditor(ListGridEditorContext context) {
                    ListGridField field = context.getEditField();
    
                    if(field.getName().equals("Comment")){
                                RichTextItem richTextItem = new RichTextItem();
                                richTextItem.setControlGroups("insertControls", "bulletControls", "formatControls", "styleControls","colorControls","fontControls");
                                richTextItem.setHeight(200);
                                field.setWidth(500);
                                return richTextItem;
                    }
    
                    return context.getDefaultProperties();
                }
            });

    Attached Files
    Last edited by user316; 12 Apr 2017, 11:01.

    #2
    Apologies for the delay on this one - the first issue is now fixed in the framework and will hit builds dated April 22 and later.

    We're looking into the second part now and will update here when we have more information.

    Comment


      #3
      Having tested the second issue you mention, we aren't seeing the incorrect dismissal of the editor - indeed, it's not clear how the editor can actually *be* dismissed, given that it exists in a grid cell...

      We've tried a local test with TreeGrid and ListGrid - can you show a runnable sample and steps to reproduce?

      Comment


        #4
        Hi,

        I am attaching source code and a screenshot of the scrollbar issue. I've reproduced it with some example code with a ListGrid. I am using Google Chrome 52.0.2743.82 m, and SmartClient Version: SNAPSHOT_v11.1d_2017-01-31/PowerEdition Deployment (built 2017-01-31). I see the same problem using IE9 and Firefox 53.0.

        To reproduce, double click on Brasilia or any item in the Capital column to start editing. When you single-click (or single-click and hold) the button of the scrollbar, the editor disappears.
        Attached Files
        Last edited by user316; 24 Apr 2017, 07:52.

        Comment


          #5
          I have provided a code sample yesterday for the disappearing scrollbar issue I mentioned. Could this please be looked into?

          Comment


            #6
            Your screenshot does not show a missing editor - it shows a RichTextEditor with a scrollbar at the bottom of it, which is there because you specified a large width (and RichTextEditors with toolbars have a minimum width anyway).

            Do you mean that when you first double-click the cell, a pop-up picker is visible *in front of* the RichTextEditor? If so, this might mean that second click of your double-click is actually being passed through to the button under the mouse (the insert link button), which is showing it's picker... Then, when you click on the scrollbar (or *anywhere* outside of that picker), the picker will be hidden, displaying your editor correctly.

            You can test this by editing a row that actually has a value for this field...

            If that's not it, have you tried this against a more recent build? 6.1 is close to release and has received many updates in the last 3 months since your build.

            Comment

            Working...
            X