简体   繁体   English

IE8中Facebook Javascript SDK的FB.ui错误

[英]Facebook Javascript SDK's FB.ui Bug in IE8

i have found a bug in IE8 using the new Facebook Javascript SDK. 我使用新的Facebook Javascript SDK在IE8中发现了一个错误。

i call a Post dialog using: 我使用以下命令调用发布对话框:

FB.ui(
 {
  method: 'stream.publish',
  display: 'dialog',
  message: 'test',
  attachment: {
   name: 'test',
   caption: 'test',
   media: [
   {type: 'image', src: site_url+'test.jpg', href: site_url}
   ],
   description: (
   'test'
   ),
   href: site_url
  }
 },

my html structure is: 我的html结构是:

<body>
  <div id="content"></div>
  <script type="text/javascript">
   var params = {
     wmode: 'opaque',
     allowScriptAccess: 'always',
     quality: 'high',
     allowFullScreen: "true"
    };
    var attributes = {
      id: 'test'
      };


    swfobject.embedSWF("frontend/swf/stage.swf", "content", "100%", "100%", "10", params, attributes);
   var site_url = 'http://test.com';
  </script>

  <div id="fb-root"></div>
  <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script>
  <div id="like-dialog" style="display:none;">
   <div id="like-dialog-wrapper">
    <div id="like-dialog-close"></div>
    <iframe src="http://www.facebook.com/plugins/likebox.php?id=99999999999&amp;width=292&amp;connections=0&amp;stream=true&amp;header=false&amp;height=395" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:395px;"></iframe>
   </div>
  </div>
 </body>

the css: CSS:

html, #content, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
}
#content {
        z-index: 1;
}

what i do is: 我要做的是:

  1. i embed my stage 我嵌入了舞台

  2. i call the FB.init function and then call FB.ui function to overlay my flash. 我先调用FB.init函数,然后再调用FB.ui函数以覆盖Flash。

it works in every common browser except IE8. 它可以在除IE8之外的所有常见浏览器中使用。

in IE8 the div containing the iframe is behind the div where i embed flash, although i set the z-index and position the dialog absolute. 在IE8中,包含iframe的div在我嵌入Flash的div后面,尽管我设置了z-index并将对话框定位为绝对位置。

any ideas? 有任何想法吗?

thanks in advance 提前致谢

Switching from swfobject to standard embed code worked for me. swfobject切换到标准嵌入代码对我来说很有效。

(with wmode transparent ) (使用wmode 透明

将wmode设置为透明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM