OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
688 stars 95 forks source link

Word: Context menu is not visible when right-clicking a paragraph within a list (Word Desktop) #1392

Open osasseville opened 4 years ago

osasseville commented 4 years ago

When adding an OfficeMenu with an id set to "ContextMenuText", the context menu is only visible to the paragraphs that are not an element of a list (numbered or bullet) in word desktop. It's important to note that is not the case of Word on the web.

Expected Behavior

It should either work on be mention in the documentation.

Current Behavior

Context menu displays in any paragraph that is not element of a list. It's important to note that is not an issue for the web version of Word.

Steps to Reproduce, or Live Example

  1. Create an "yo office" project and select word as the target
  2. Add a context menu extension point
  3. Add a single button control for that context menu.
  4. Start the office-js project and add a paragraph to the word document
  5. Validate that the context menu work on the paragraph
  6. Click on the "bullet list" icon
  7. Validate that the context menu does not work on the paragraph

Context

Because of this issue and this other issue, we decided to not rely on office-js for implementing our context menu. We created a second plugin using AddinExpress that send the context menu events to the web application threw SignalR. That significantly increases the complexity the update deployment and authentication because there's two application now. We hope that Microsoft can fix this quickly so we can get back on only using the office-js.

Your Environment

Useful logs

Here's an example of the manifest being used. manifest.xml gist

osasseville commented 3 years ago

Any update on this?

jamding commented 2 years ago

@AbidRahman-MSFT any update on this?

AbidRahman-MSFT commented 2 years ago

Hey @jamding - are you still facing the same issue? does the issue only occur if right-clicking inside a list? how about a table?

osasseville commented 2 years ago

Hi @AbidRahman-MSFT ,

It does not work in a table or a list.

context-menu.docx

noseworthy commented 1 year ago

Hey folks,

I'm also running into this issue. Thought I had a broken manifest for a while and was driving myself mad trying to fix the issue when I found that the context menu worked fine when right clicking on things outside of tables or lists.

Any update on this issue? Or alternatively, does anyone have a work around? Thanks!

c5teele commented 1 year ago

I've also found that it does not appear if the selected text (or the cursor is simply within) a heading or a spelling error, and confirm it is not working on selections within a list.

genericlawcoder commented 11 months ago

Any update on this issue? We use it for an add-in related to contracts and a common theme is using the list function to create the clauses (e.g. clause 1, clause 1.1, clause 1.2 etc.) essentially negating the use of the contextmenu entirely.

temilson commented 1 week ago

Nearly a year later ... any updates on this? Definitely still an issue for me.