Ticket T818960
Visible to All Users

Popup menu disappears on releasing mouse in Word VSTO addin

created 5 years ago

When right-clicking over a data grid or tree list in a dialog displayed in a Word VSTO addin (Office 365  Version 1909 12026.20248) the popup menu automatically closes when I release the mouse button.  I have not noticed this behaviour prior to upgrading to 19.1.6 however I can't say definitively that is when the issue arose.

I have another Winforms project using the same version of DevExpress which is not an Office addin and the popup menu works correctly.

I have tried e.Allow = false after showing the menu however that does not make  a difference.

Any ideas?

C#
private void TvAllTables_PopupMenuShowing(object sender, DevExpress.XtraTreeList.PopupMenuShowingEventArgs e) { this.popupMenuTable.ShowPopup(Control.MousePosition); e.Allow = false; }
Show previous comments (3)

    Hi,

    I can replicate the issue in your sample app (modified app attached).

    Note this happens to ALL popup menus.  This was working then they all stopped working.  I am confident there aren't any exceptions.

      Demonstration of behaviour attached.  Note at the end I double right-click and the menu stays.

        Please also note I have rolled back to Office 365 semi-annual channel, version 1902 (build 11328.20420) and still have the same behaviour.

        Answers approved by DevExpress Support

        created 5 years ago

        Hello John,
         
        Thank you for the video and sample. I tested your sample project on my side but the issue is not reproducible. Please review the attached video that illustrates this.
         
        However, we are aware of such issues in certain environments. Please refer to the GridView PopupMenu instantly closing thread for additional information. Also, try calling the DevExpress.XtraBars.MessageFilter.BarManagerHook.FilterMouseEvents method:

        C#
        DevExpress.XtraBars.MessageFilter.BarManagerHook.FilterMouseEvents();

        I look forward to your results.

          Comments (2)

            Hi,

            The FilterMouseEvents function worked.  I'm not sure what this does because I can't find any documentation for it and have never needed it before even though I've developed dozens of Word addins but it works so I won't complain! :)

            Cheers,
            John

            Sasha (DevExpress Support) 5 years ago

              Hello John,
               
              I am happy to hear that my assistance was helpful. Yes, the FilterMouseEvents method is not documented. We introduced it for rare cases when the same mouse messages are sent twice in some environments (e.g. when our components are used in an add-in). In any case, it's safe to use this method.
               
              Please let me know if I can be of more help.

              Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

              Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.