diff options
author | Deathamns <deathamns@gmail.com> | 2014-10-25 09:50:37 +0200 |
---|---|---|
committer | Deathamns <deathamns@gmail.com> | 2014-11-09 17:40:48 +0100 |
commit | 99d8f431d5c7b393dcf8cbe6382beec13c29f781 (patch) | |
tree | 5d31cb3d2d6222fbd9a53d44ccf41dd10d24cf6b /src/css | |
parent | 54749b31fbdcedcaf601fe4bce00b3ce15d04532 (diff) | |
download | uBlock-99d8f431d5c7b393dcf8cbe6382beec13c29f781.zip uBlock-99d8f431d5c7b393dcf8cbe6382beec13c29f781.tar.gz uBlock-99d8f431d5c7b393dcf8cbe6382beec13c29f781.tar.bz2 |
input[type="file"].click() didn't work in Safari
Click couldn't be initiated with JavaScript in Safari if the input was
hidden with display: none. Using visibility: hidden or opacity: 0 solves
the problem.
Alternative solution would be to hide (opacity: 0) the input and slide it
(position: absolute; top: 0; left: 0; width: 100%; height: 100%) over the
button, which would work in all browsers, and wouldn't require JavaScript.
Diffstat (limited to 'src/css')
-rw-r--r-- | src/css/common.css | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/css/common.css b/src/css/common.css index 3509396..ba52e1f 100644 --- a/src/css/common.css +++ b/src/css/common.css @@ -1,9 +1,9 @@ @font-face { - font-family: 'FontAwesome'; - src: url('fonts/fontawesome-webfont.ttf') format('truetype'); - font-weight: normal; - font-style: normal; -} + font-family: 'FontAwesome'; + src: url('fonts/fontawesome-webfont.ttf') format('truetype'); + font-weight: normal; + font-style: normal; + } .fa { font-family: FontAwesome; font-style: normal; @@ -64,3 +64,9 @@ body[dir=rtl] [data-tip][data-tip-anchor="top"]:hover:after { 85% { opacity: 0; } 100% { opacity: 1; } } + +.hiddenFileInput { + visibility: hidden; + width: 0; + height: 0; + } |