Skip to content
Browse files

Fix for failing to initialize on (some) Android devices.

  • Loading branch information...
1 parent 2237ed6 commit 4dbc5561edf96cd15b4b1c1e9d5098d01e6749cc @sleavitt sleavitt committed Aug 11, 2010
Showing with 8 additions and 3 deletions.
  1. +8 −3 web_socket.js
View
11 web_socket.js
@@ -305,10 +305,15 @@
var container = document.createElement("div");
container.id = "webSocketContainer";
// Puts the Flash out of the window. Note that we cannot use display: none or visibility: hidden
- // here because it prevents Flash from loading at least in IE.
+ // here because it prevents Flash from loading at least in IE. Attempting to move it off-screen
+ // at all appears to fail on Android devices, so we'll initialize it in a 1x1 div at absolute
+ // 0, 0 with a z-index of -65535 instead.
container.style.position = "absolute";
- container.style.left = "-100px";
- container.style.top = "-100px";
+ container.style.left = "0px";
+ container.style.top = "0px";
+ container.style.width = "1px";
+ container.style.height = "1px";
+ container.style.zIndex = -65535;
var holder = document.createElement("div");
holder.id = "webSocketFlash";
container.appendChild(holder);

0 comments on commit 4dbc556

Please sign in to comment.
Something went wrong with that request. Please try again.