You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: knowledge-base/tooltip-display-disabled-context-menu-items.md
+16-35Lines changed: 16 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Display Tooltips on Disabled Context Menu Items
2
+
title: Display Tooltip on Disabled Context Menu Items
3
3
description: Learn how to show tooltips over menu items that appear disabled in a Blazor application, using CSS for visual effects and conditional rendering.
4
4
type: how-to
5
5
page_title: How to Show Tooltips on Visually Disabled Context Menu Items with Blazor
@@ -27,7 +27,7 @@ This knowledge base article answers the following questions:
27
27
28
28
## Solution
29
29
30
-
By default, disabled elements are not interactive, meaning they don’t trigger events like hover, click, or tooltip. However, you can achieve the desired behavior by making them appear visually "disabled" while keeping them interactive for tooltips with the CSS shown below.
30
+
By default, disabled elements are not interactive and don’t trigger events like hover or click. Thus they don't integrate with tooltips. However, you can achieve the desired behavior by making them appear visually disabled while keeping them interactive for tooltips with the CSS code below.
31
31
32
32
`````RAZOR
33
33
<style>
@@ -36,31 +36,27 @@ By default, disabled elements are not interactive, meaning they don’t trigger
36
36
cursor: not-allowed;
37
37
}
38
38
39
-
.disabled-item > * {
40
-
pointer-events: none; /* Prevent clicks on inner content but allow hover on parent */
41
-
}
39
+
.disabled-item > * {
40
+
pointer-events: none; /* Prevent clicks on inner content but allow hover on parent */
0 commit comments