Skip to content

Commit ab3f92f

Browse files
authored
fix(ui5-busyindicator): Set bigger opacity for IE (#2010)
Fixes: #2005
1 parent 2c95be4 commit ab3f92f

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

packages/main/src/BusyIndicator.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="ui5-busyindicator-root">
1+
<div class="{{classes.root}}">
22
<div class="ui5-busyindicator-wrapper">
33
{{#if active}}
44
<div class="ui5-busyindicator-dynamic-content" role="progressbar" aria-valuemin="0" aria-valuemax="100" title="{{ariaTitle}}">

packages/main/src/BusyIndicator.js

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
22
import litRender from "@ui5/webcomponents-base/dist/renderer/LitRenderer.js";
3+
import { isIE } from "@ui5/webcomponents-base/dist/Device.js";
34
import { fetchI18nBundle, getI18nBundle } from "@ui5/webcomponents-base/dist/i18nBundle.js";
45
import BusyIndicatorSize from "./types/BusyIndicatorSize.js";
56
import Label from "./Label.js";
@@ -159,6 +160,15 @@ class BusyIndicator extends UI5Element {
159160
return this.i18nBundle.getText(BUSY_INDICATOR_TITLE);
160161
}
161162

163+
get classes() {
164+
return {
165+
root: {
166+
"ui5-busyindicator-root": true,
167+
"ui5-busyindicator-root--ie": isIE(),
168+
},
169+
};
170+
}
171+
162172
_preventEvent(event) {
163173
if (this.active) {
164174
event.stopImmediatePropagation();

packages/main/src/themes/BusyIndicator.css

+8-4
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@
1111
pointer-events: none;
1212
}
1313

14+
15+
:host([active]) :not(.ui5-busyindicator-root--ie) ::slotted(:not([class^="ui5-busyindicator-"])) {
16+
opacity: 0.6;
17+
}
18+
1419
/**
15-
* IE fix: using just the "*" all selector in IE,
16-
* will set the opacity=0.6 to busy indicator internal elements
20+
* IE fix: 0.6 makes the content almost invisible, so we set it to 0.95 in IE
1721
*/
18-
:host([active]) ::slotted(:not([class^="ui5-busyindicator-"])) {
19-
opacity: 0.6;
22+
:host([active]) .ui5-busyindicator-root--ie ::slotted(:not([class^="ui5-busyindicator-"])) {
23+
opacity: 0.95;
2024
}
2125

2226
:host([size="Small"]) .ui5-busyindicator-root {

0 commit comments

Comments
 (0)