CSS ::after position not updating in Safari -
i have css problem in safari. after changing text of html element position of ::after not update.
$('#view').text("shorter text"); // not update position of #view::after pseudo-element
http://jsfiddle.net/cpdmlnw7/
but works in chrome , firefox.
any ideas why?
seems bug in safari. if force reflow fixes itself.
e.g. based on suggestion in https://stackoverflow.com/a/3485654/1469259:
var span=$('#view'); span.text("changing text not update").css("display","inline-block").height(); span.css("display","inline");
the call height()
forces browser re-render span after style change (so can calculate "new" height). without updates rolled 1 , nothing happens. achieve similar effect using settimeout(...)
0 timeout.
updated fiddle: http://jsfiddle.net/cpdmlnw7/4/
Comments
Post a Comment