Hybrid View

  1. #1
    Sencha Premium Member
    Join Date
    Oct 2008
    Posts
    79
    Vote Rating
    0
    Cputerace is on a distinguished road

      0  

    Default Allowing browser context menu for certain widgets (keeping disabled on all others)

    Allowing browser context menu for certain widgets (keeping disabled on all others)


    In our entrypoint, we call:

    viewport.setContextMenu(null);

    To disable the browser context menu across the board. We now have a request from a user to enable the browser context menu for text areas so they can take advantage of the built in browser spell-check functionality. What would we have to do to turn the default browser context menu back on for a specific Component but leave it off for the rest of the UI?

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    I would follow a different approach with this.

    Try to listen for the Event.OnConextMenu event on the Document component. In the event check the target. If its not a textarea, you can prevent the default action, else allow it.
    I have not tested this.

Thread Participants: 1