File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -73,9 +73,6 @@ function toggleFallback(toggle = false) {
7373 . filter ( part => part . trim ( ) !== property )
7474 . join ( ',' ) ;
7575 }
76-
77- // Force a repaint as sometimes Safari doesn't want to fill the screen
78- setTimeout ( ( ) => repaint ( this . target ) , 100 ) ;
7976 }
8077
8178 // Toggle button and fire events
Original file line number Diff line number Diff line change 22// Animation utils
33// ==========================================================================
44
5- import { toggleHidden } from './elements' ;
65import is from './is' ;
76
87export const transitionEndEvent = ( ( ) => {
@@ -21,14 +20,19 @@ export const transitionEndEvent = (() => {
2120} ) ( ) ;
2221
2322// Force repaint of element
24- export function repaint ( element ) {
23+ export function repaint ( element , delay ) {
2524 setTimeout ( ( ) => {
2625 try {
27- toggleHidden ( element , true ) ;
28- element . offsetHeight ; // eslint-disable-line
29- toggleHidden ( element , false ) ;
26+ // eslint-disable-next-line no-param-reassign
27+ element . hidden = true ;
28+
29+ // eslint-disable-next-line no-unused-expressions
30+ element . offsetHeight ;
31+
32+ // eslint-disable-next-line no-param-reassign
33+ element . hidden = false ;
3034 } catch ( e ) {
3135 // Do nothing
3236 }
33- } , 0 ) ;
37+ } , delay ) ;
3438}
You can’t perform that action at this time.
0 commit comments