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>
Hmm. I don't think this makes sense, but I found the solution:
If I attach the SfContextMenu to the ToolTip, it works:
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
- 2 Replies
- 2 Participants
-
PR Peter Rasmussen
- Aug 25, 2025 12:49 PM UTC
- Aug 26, 2025 10:34 AM UTC