Results 1 to 2 of 2

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha Premium Member
    Join Date
    Oct 2008
    Posts
    79
    Vote Rating
    0
      0  

    Default 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 Premium Member
    Join Date
    Sep 2007
    Posts
    13,976
    Vote Rating
    131
      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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •