Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

flash no initializing when container has no content #532

Closed
wants to merge 1 commit into from

3 participants

@LeandroJF

e.g: in the events.html example, if we remove the style attribute and also the content from the container element, the flash fails to initialize in FF and Chrome as the height will be 0px. Setting min-height and min-width solves the problem.

@LeandroJF LeandroJF setting min-width and min-height as flash runtime do not initialize w…
…hen there's no content in the container (FF and Chrome)
8ceca83
@whitehat101

I ran into this issue before seeing your pull. I think not setting "height: 100%" in the first place is slightly better than setting min-heights. (eg: IE7 doesn't know how to handle min-height). I believe width/min-width is unrelated to this issue.

@LeandroJF

agree that IE doesn't understand "min-height" but IE treats "height" as "min-height", so this problem doesn't happens in IE, so no need to worry. And about "min-width" is to avoid problems when people put "width: 0px" on the container without knowing that flash won't initialize.

@jayarjo
Owner

This has been addressed in Plupload 2. We make sure that container has enough height/width for Flash to initialize.

@jayarjo jayarjo closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 5, 2012
  1. @LeandroJF

    setting min-width and min-height as flash runtime do not initialize w…

    LeandroJF authored
    …hen there's no content in the container (FF and Chrome)
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/javascript/plupload.flash.js
View
4 src/javascript/plupload.flash.js
@@ -122,6 +122,10 @@
if (plupload.getStyle(container, 'position') === 'static') {
container.style.position = 'relative';
}
+ if (container) {
+ container.style.minWidth = '1px';
+ container.style.minHeight = '1px';
+ }
}
container.appendChild(flashContainer);
Something went wrong with that request. Please try again.