Skip to content

Commit

Permalink
fix loading indicator in safari, and added a workaroudn for ie11 (#1650)
Browse files Browse the repository at this point in the history
- animation in the loading indicator's svg tag fail to restart in safari after display is set to none. Since the display was used to stop the animation, and doesn't affect what is display, changing it to `animation: none;` fixed it.
- EI11 does not support `stroke-dashoffset` property in css animation.  Added a workaround for ie11 by setting a smaller length for the loading circle's stroke to simulate a fixed gap on rotation instead of a dynamic shrink/expand animation with `stroke-dashoffset`

J=SLAP-1755
TEST=manual

load page and perform search in EI11, safari, chrome, and firefox. See that loading indicator behave as expected.
  • Loading branch information
yen-tt committed Jan 18, 2022
1 parent cb55006 commit 9186f53
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/ui/sass/modules/_SearchBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,21 @@ $searchbar-button-text-color-active: var(--yxt-searchbar-button-text-color-base)
&-LoadingIndicator-AnimatedIcon
{
stroke-dasharray: 208;
/* IE11 specific styling */
_:-ms-fullscreen, :root & {
/**
* IE11 does not support stroke-* properties in animation, so use smaller stroke
* length to simulate a fixed gap instead of using stroke-dashoffset in animation.
*/
stroke-dasharray: 150;
}
transform-origin: 50% 50%;
animation: dash 1.4s ease-in-out infinite;
}

&-Icon--inactive &-LoadingIndicator-AnimatedIcon
{
display: none;
animation: none;
}

@keyframes dash
Expand Down

0 comments on commit 9186f53

Please sign in to comment.