Hi All,
I have an issue with SfDocumentEditor and its custom context menu when Syncfusion.Blazor.WordProcessor is at version 30.2.4, it works just fine with version 30.1.42 (regardless of all other SyncFusion components which I left at 31.2.4, all symptoms are identical if all versions are leveled with Syncfusion.Blazor.WordProcessor's version): the context menu doesn't appear at all.
I narrowed down to the minimal code example of https://help.syncfusion.com/document-processing/word/word-processor/blazor/how-to/customize-context-menu which has the same behavior as my application: the context menu doesn't show up on the client after 30.2.4 -> 31.2.4 update.
documentEditor.ContextMenu.AddCustomMenu(contentMenuItem, false, false);Is there a new syntax introduced in 31.2 and the documentation is not up to date? If so I could not find any notes related to it. If you suspect this is not expected behavior, the doc above should be enough for a straight-forward reproduction.
Looking at the release notes of 30.2.x that were related to this area one could notice
#I733109 - Fixed performance issue when SfDocumentEditorContainer component was added as a child component. (https://blazor.syncfusion.com/documentation/release-notes/30.2.4?type=all#docio )Hi Thomas Villeneuve,
We attempted to replicate the reported issue in the latest version 31.2.4. However, the custom option is correctly added to the context menu, and the event is properly bound. A sample and video have been attached for your reference.
If the issue continues, please provide the sample you used or modify the attached sample to reproduce the problem and return it to us. This will allow us to investigate further and offer a suitable solution promptly.
Regards,
Mohammed Affan C
Hi Mohammed Affan Saqib Hussain,
Thank you for investigating this. First I want to apologize for the assumption it would be easy to reproduce: it wasn't!
I just replaced my whole <SfDocumentEditorContainer>...</SfDocumentEditorContainer> code by the website's sample one in my project and saw the same problem so I concluded the root-cause wasn't in my code. But after failing to reproduce on your sample it happens to be narrowed in a specific scenario: it occurs when in a "sub-menu" of my application where I use a cascade of dialogs with blur background. The code in my application leading to this scenario is deeply tied to users' account and preferences and despite trying to get a minimal example it would be too long to untie it from DB service containers, etc.
However, after some digging, I noticed that the issue lies in the z-index given to the context menu:
In 30.1.42 my context-menu component receives a z-index of 1401
Once changed to 31.2.4 (only change made), the z-index is different and sets at 1001, which sets it behind the background blur.
I confirmed that editing the value in devtools to 1401 makes the context menu appear.
At this point I understand that my scenario is very specific, the changes introduced in 31.2.4 won't cause problems for 99% of the use cases so I'm happy enough to close it.
If anyone in the future is interested in a workaround for this scenario, I'm just going to put a z-index override as isolated css for the component:
<style >
.e-sfcontextmenu {
z-index: 1401 !important;
}
</style>
Thank you
Hi Thomas Villeneuve,
Thank you for your update. We understand that you have identified the root cause and implemented a suitable workaround. If you are facing any other issues, kindly share a simplified sample or the complete code for further assistance.
Please let us know if you require any additional support or have further questions.
Regards,
Sujitha S