Tooltip seems to hide ContextMenu

I am using this code to show a ToolTip and a ContextMenu on an SfTextBox

But apparently, if I enable the code for the the ToolTip, it hides the ContextMenu? At least it will not show the Context Menu


                            <td width="400px">

                                @* <SfTooltip Content="@(SelectedDocumentData.Pdffilename)" Position="Position.TopCenter"> *@

                                    <SfTextBox ID="tbp" Readonly="true" Placeholder="PDF file name:" @bind-Value="SelectedDocumentData.Pdffilename" CssClass="e-small" FloatLabelType="@FloatLabelType.Always"></SfTextBox>

                                    <SfContextMenu Target="#tbp" TValue="MenuItem">

                                        <MenuItems>

                                            <MenuItem Disabled="_disablePdfContextMenuItemOpenPdf" id=@PdfContextMenuItemOpenPdfId Text=@PdfContextMenuItemOpenPdf></MenuItem>

                                            <MenuItem Disabled="false" id=@DocumentContextMenuItemCopyPdfFilenameToClipboardId Text=@DocumentContextMenuItemCopyPdfFilenameToClipboard></MenuItem>

                                            <MenuItem Disabled="_disablePdfContextMenuItemMovePdfToDb" id=@PdfContextMenuItemMovePdfToDbId Text=@PdfContextMenuItemMovePdfToDb></MenuItem>

                                            <MenuItem Disabled="_disablePdfContextMenuItemExtractPdfFromDb" id=@PdfContextMenuItemExtractPdfFromDbId Text=@PdfContextMenuItemExtractPdfFromDb></MenuItem>

                                            <MenuItem Disabled="_disablePdfContextMenuItemDeletePdfExternal" id=@PdfContextMenuItemDeletePdfExternalId Text=@PdfContextMenuItemDeletePdfExternal></MenuItem>

                                            <MenuItem Disabled="_disablePdfContextMenuItemDeletePdfFromDb" id=@PdfContextMenuItemDeletePdfFromDbId Text=@PdfContextMenuItemDeletePdfFromDb></MenuItem>

                                        </MenuItems>

                                        <MenuEvents TValue="MenuItem" ItemSelected="@DocumentContextMenuItemSelectedHandler"></MenuEvents>

                                    </SfContextMenu>

                                @* </SfTooltip> *@

                            </td>




2 Replies

PR Peter Rasmussen August 26, 2025 09:40 AM UTC

Hmm. I don't think this makes sense, but I found the solution:

If I attach the SfContextMenu to the ToolTip, it works:

Image_6798_1756201189732



YA YuvanShankar Arunagiri Syncfusion Team August 26, 2025 10:34 AM UTC

Hi Peter,


We are glad that you found a solution. Based on the target property, both the tooltip and context menu popup will show on the target element. It is the behavior of the Context Menu and Tooltip components. Please get back to us if you need any other assistance.


Regards,

YuvanShankar A


Loader.
Up arrow icon