[extensions-web] css: Fix icon/screenshot uploader in WebKit browsers



commit 1eb2acef4c0f4c170f60502ff838b7ad98cbb809
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Mar 4 15:35:36 2012 -0500

    css: Fix icon/screenshot uploader in WebKit browsers
    
    WebKit doesn't allow uploading through file forms that are invisible.
    Stuff them off-screen to trick WebKit into thinking they're being rendered,
    instead. I hate web development.

 sweettooth/static/css/sweettooth.css |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/static/css/sweettooth.css b/sweettooth/static/css/sweettooth.css
index 6d6a3d0..aa304dd 100644
--- a/sweettooth/static/css/sweettooth.css
+++ b/sweettooth/static/css/sweettooth.css
@@ -385,7 +385,12 @@ li.extension:last-child {
 }
 
 .extension .upload input {
-    display: none;
+    /* Hack: WebKit doesn't pop up the uploader
+     * for invisible input fields, so just stuff
+     * it off-screen.
+     */
+    position: absolute;
+    left: -9999em;
 }
 
 .extension .uninstall {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]