Skip to content

Commit db3d8fc

Browse files
committed
Increased flash z-index to 2147483647
I've recently had problems getting FileAPI to use Flash. Although Flash was being detected and the flash uploader inserted on the page, FileAPI was falling back to using an iFrame for submission. After investigating further, it turns out that the flash uploader was being hidden behind other elements. FileAPI uses a z-index of 1000000, but apparently some of our elements are even higher than that (don't ask why). To resolve this, I've increased the z-index to 2^32, which I believe is the maximum that both legacy and new browsers will accept (see http://www.puidokas.com/max-z-index/). This resolves the problem for me, and now FileAPI successfully uses the flash uploader.
1 parent dcd288f commit db3d8fc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/FileAPI.Flash.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
, width: 5
7878
, height: 5
7979
, position: 'absolute'
80-
, zIndex: 1e6+'' // set max zIndex
80+
, zIndex: 2147483647+'' // set max zIndex
8181
});
8282

8383
child.parentNode.insertBefore(dummy, child);
@@ -188,7 +188,7 @@
188188
, left: 0
189189
, width: target.offsetWidth
190190
, height: target.offsetHeight
191-
, zIndex: 1e6+'' // set max zIndex
191+
, zIndex: 2147483647+'' // set max zIndex
192192
, position: 'absolute'
193193
});
194194

0 commit comments

Comments
 (0)