VE-1226 Fix Safari bug removing content after image gallery