Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploadify inside Jquery UI Dialog => Chrome & Opera bugs

I have the following code:

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" type="text/css" media="screen" href="jquery-ui-1.8.9.custom.css" />
        <script type="text/javascript" src="jquery-1.5.min.js"></script>
        <script type="text/javascript" src="jquery-ui-1.8.9.custom.min.js"></script>
        <script type="text/javascript" src="jquery.uploadify.js"></script>
    </head>
    <body>
        <script type="text/javascript">
            manualLightboxContent = function ()
            {
                $("#dialogContent").html($('#module_wrapper').html());
                $("#dialogContent").dialog( { 'modal': true } );
            }
        </script>
        <a href="#" onclick="manualLightboxContent();">Open</a>
        <div id="dialogContent" style="display:none;"></div>

        <div id="module_wrapper" style="display:none;">
            <script type="text/javascript">
            $().ready(function() {
                $('#uploadFile').uploadify({
                    'swf'  : 'uploadify.swf',
                    'fileObjName' : "uploadFile"
                });
            });
            </script>
            <input id="uploadFile" type="file" name="uploadFile" />
        </div>
    </body>

</html>

I can't find why, but in chrome, I'm not able to open the browse windows. Exactly like if there was some invisible div floating over the swf.

In opera, the bug is less important: the SELECT FILES text is under the swf instead of over.

If uploadify is outside a jquery UI dialog, it works just fine.

Can anyone explain me why this bug occur ?

Edit: Using Uploadify 3.

like image 440
FMaz008 Avatar asked May 06 '11 19:05

FMaz008


1 Answers

I recently had the same problem, after looking up a bit at the code i have noticed the following at line 193:

jQuery('#' + swfuploadify.movieName).css({position: 'absolute', 'z-index': 1, 'left' : '0px'});

Simply changing the z-index to 9999 worked for me

jQuery('#' + swfuploadify.movieName).css({position: 'absolute', 'z-index': 9999, 'left' : '0px'});
like image 178
Maayan Glikser Avatar answered Oct 13 '22 00:10

Maayan Glikser