From fcec8d058d981593b1d237d7760f42354ee7684a Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 28 Apr 2014 09:58:13 +0200 Subject: [PATCH] fix lazy loading bug related to data-background-image attribute --- js/reveal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/reveal.js b/js/reveal.js index d3ca1fe..c6187ec 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -613,7 +613,7 @@ if( data.background ) { // Auto-wrap image urls in url(...) if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test( data.background ) ) { - slide.setAttribute( 'data-background-image', 'url('+ data.background +')' ); + slide.setAttribute( 'data-background-image', data.background ); } else { element.style.background = data.background; @@ -2336,7 +2336,7 @@ // Images if( backgroundImage ) { - background.style.backgroundImage = backgroundImage; + background.style.backgroundImage = 'url('+ backgroundImage +')'; } // Videos else if ( backgroundVideo ) {