javascript - Safari text jumps/flicker when changing margin-top -


i have code:

            if (curtop > top )             {                 $text.css("margin-top", math.abs( rect.top ) + cury + "px");                     }             else             {                 $text.css("margin-top", cury - math.abs( rect.top ) + "px");                         } 

where rect is:

            rect        = $text.get( 0 ).getboundingclientrect(); 

and cury:

            var cury    = parseint( $text.css( "margin-top" ) ); 

i believe there nothing wrong that... because works
in chrome , firefox... i'm noobish @ safari , not see why flickering...

in advance thank you!.

this solver animated it, might work others, it's perfect me:

        if ( issafari )         {             $text.css({ "-webkit-transition": "1s ease-in-out" });         } 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -