All cells in FlexSheet are selected when top-left cell is right-clicked

Posted by: holly.anderson on 4 December 2017, 2:29 am EST

    • Post Options:
    • Link

    Posted 4 December 2017, 2:29 am EST

    Hello,

    I’ve noticed that in the latest pre-release build (5.20173.385), all cells in a FlexSheet are selected when the top-left cell is right-clicked. This behavior was not occurring in version 5.20173.380. Was this change intentional? If so, is there some workaround that could be implemented to revert this behavior? I have a context menu tied to the top-left cell, and I don’t want all the cells in the spreadsheet to be selected when the user right-clicks on the top-left cell to trigger the menu.

    Thanks,

    Holly

  • Posted 4 December 2017, 10:41 pm EST

    Hi,

    We are investigating on this. We will update you soon.

    ~Manish

  • Posted 5 December 2017, 4:12 pm EST

    Hi Holly,

    We are able to replicate the issue at our end and it seems a bug. Hence this issue has been forwarded to the concerned team for further investigation with internal tracking id 299761.

    We will let you know as we get any update on this.

    ~Manish

  • Posted 4 January 2018, 11:37 pm EST

    Is there any update on this issue?

  • Posted 7 January 2018, 3:30 pm EST

    Hi Holly,

    Current behavior of right click in top left cell is correct.

    Please check the MS excel, you will observe it has the same behavior.

    Thanks,

    Manish

  • Posted 8 January 2018, 12:14 am EST

    Hi Manish,

    Thanks for the update. As previously stated, I have a context menu tied to the top-left cell, and I don’t want all the cells in the spreadsheet to be selected when the user right-clicks on the top-left cell to trigger the menu. I understand that this is the intended behavior, but is there some workaround that could be implemented to avoid this?

    Thanks,

    Holly

  • Posted 8 January 2018, 4:00 pm EST

    Hi Holly,

    For this, we need to handle mouseup event and cancel this event to be trigger. Please use the following code snippet for the same.

    flex.addEventListener(flex.hostElement, 'mouseup', function (e) {
                    if (e.which === 3) {
                        let ht = flex.hitTest(e);
                        if (ht.panel.cellType === wijmo.grid.CellType.TopLeft) {
                            e.preventDefault();
                            e.stopPropagation();
                        }
                    }
                },true);
    

    ~Manish

  • Posted 9 January 2018, 1:07 am EST

    Hi Manish,

    That seems to be working. Thanks for the code snippet!

    Holly

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels