Skip to content

Commit d6ee5ea

Browse files
authored
fix(ui5-color-palette): show tooltip on focused hovered items (#11519)
There was a bug where upon hovering on a focused item, the tooltip (if such is present) was not showing. The reason behind that was a CSS property disabling all events - pointer-events: none. We fix that by ensuring that the property pointer-events: none is present when the ui5-color-palette-item (swatch) is focused but NOT hovered. This ensures that: - The tooltip is visible when the user hovers over a focused ui5-color-palette-item; - The focus/hover visual appearance is maintained;
1 parent e46b867 commit d6ee5ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/main/src/themes/ColorPaletteItem.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
outline: none;
6767
}
6868

69-
:host(:not([_disabled]):not([on-phone]):focus) .ui5-cp-item {
69+
:host(:not([_disabled]):not([on-phone]):focus:not(:hover)) .ui5-cp-item {
7070
pointer-events: none;
7171
}
7272

@@ -90,7 +90,7 @@
9090
pointer-events: none;
9191
}
9292

93-
:host(:not([_disabled]):not([on-phone]):hover:focus) .ui5-cp-item:focus:not(:hover)::before {
93+
:host(:not([_disabled]):not([on-phone]):focus:hover) .ui5-cp-item::before {
9494
content: "";
9595
box-sizing: border-box;
9696
position: absolute;
@@ -100,7 +100,7 @@
100100
pointer-events: none;
101101
}
102102

103-
:host(:not([_disabled]):not([on-phone]):focus:not(:hover)) .ui5-cp-item:focus:not(:hover)::after {
103+
:host(:not([_disabled]):not([on-phone]):focus:hover) .ui5-cp-item::after {
104104
content: "";
105105
box-sizing: border-box;
106106
position: absolute;

0 commit comments

Comments
 (0)