RESOLVED WORKSFORME 22356
background image doesn't show in a popup
https://bugs.webkit.org/show_bug.cgi?id=22356
Summary background image doesn't show in a popup
zimekzimny
Reported 2008-11-19 09:14:56 PST
file1: dummy.html (empty file) file2: image.png (any image) file3: test.html <html> <head> <script type="text/javascript"> var win; var image = 'image.png'; function set_popup_background() { win.document.body.style.backgroundImage = "url(\'" + image + "\')"; return true; } function popup() { win = window.open('dummy.html', 'test', 'width=250, height=200, toolbar=no, resizable=no, scrollbars=no'); var img = new Image(); img.src = image; img.onload = set_popup_background; } </script> </head> <body> <a href="#" onClick="javascript: popup();">popup</a> </body> </html> --- To reproduce: 1) Put all the files in the same folder. 2) Open test.html with any webkit browser 3) Click on the 'popup' link (popup window opens with the background picture set just fine) 4) Close the popup box 5) Click on the same link (popup window opens but no background set) I've tested it on Opera(linux) and Safari(win XP). FF and IE browsers work fine.
Attachments
image (13.35 KB, image/png)
2008-11-19 09:17 PST, zimekzimny
no flags
dummy (2 bytes, text/html)
2008-11-19 09:18 PST, zimekzimny
no flags
test (535 bytes, text/html)
2008-11-19 09:19 PST, zimekzimny
no flags
zimekzimny
Comment 1 2008-11-19 09:17:07 PST
zimekzimny
Comment 2 2008-11-19 09:18:37 PST
zimekzimny
Comment 3 2008-11-19 09:19:27 PST
Gavin Barraclough
Comment 4 2011-06-16 15:25:44 PDT
Works for me, please reopen if this still repros for you.
Note You need to log in before you can comment on or make changes to this bug.