Announcement

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

    Tahoe: ContextMenu with selectionType single lead to selection-issue

    Hi there

    Havin selectionType set to single in a contextMenu does lead to a display-issue. After clicking an item in the contextmenu the item is also "highlighted" when you are opening the contextmenu again.
    In v11.1p_2017-08-03 Pro the same example works as expected, since v11.1p_2017-08-04 Pro this problem exists.
    The problem does not occur with the Enterprise skin.

    Version: SmartClient_v111p_2017-08-08_Pro
    Browser: Firefox 54.0.1 (32-Bit)
    Skin: Tahoe
    Density: Medium


    Code for reproduction:
    Code:
    Canvas.resizeControls(4);
    Canvas.resizeFonts(2);
    isc.ListGrid.create({
        "width": "200",
        "height": "200",
        "showContextMenu": function () {
            if (this.getEventRow() < 0)
                return false;
            else
                return this.Super('showContextMenu', arguments);
        },
        contextMenu: isc.Menu.create({
            "selectionType": "single",
            "data":
            [{
                    "click": function (p1, p2, p3, p4) {
                        isc.showMessage("Edit");
                    },
                    "title": "Edit"
                }, {
                    "click": function (p1, p2, p3, p4) {
                        isc.showMessage("Copy");
                    },
                    "title": "Copy"
                }, {
                    "click": function (p1, p2, p3, p4) {
                        isc.showMessage("Delete");
                    },
                    "title": "Delete"
                }
            ]
        }),
    
        "fields":
        [{
                "name": "nameField",
                "title": "Description",
                "type": "text",
                "width": "*",
                "canEdit": false,
                "canSort": false,
                "showHover": true
            }
        ],
        "data":
        [{
                "nameField": "this is a test",
            }
        ]
    })
    Best regards

    #2
    Why are you trying to enable selection features on a Menu? The default selectionType is "none" because menus have no concept of a permanent selection.

    But then, having enabled selection, why are you surprised that the selection is retained? There are no docs suggesting that it would be automatically cleared by hide; that doesn't happen in grids.

    Comment


      #3
      I've seen this has been fixed in the latest build.
      Originated this occured from from usage, but I wanted to report, that there might was a unwanted change in the code, so maybe other customers would also report this issue.

      Thanks for fixing.

      Comment


        #4
        Regarding setting selectionType on a Menu, there was no intentional "fix" here as the behavior of selectionType on Menu remains unspecified, and even if it were a supported mode, one would expect it to behave in the manner you seem to consider a bug.

        Comment

        Working...
        X