为什么OneDrive js选择器有时会有空开启器 [英] Why does OneDrive js picker sometimes have null opener

查看:192
本文介绍了为什么OneDrive js选择器有时会有空开启器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将OneDrive选择器与我们的Web应用程序集成,并在阅读



谢谢!

解决方案

所以原因是iframe被加载到popover - 一个具有绝对定位的div,当一个单击链接,然后在交互结束后消失。当隐藏包含div时,它会导致iframe重新加载 - 你应该尝试一种技术descibed 这里


I am trying to integrate the OneDrive picker with our web application and after reading Nick's answer to this question on 10/02/2015 have chosen the route of using an iframe and utilizing postMessage. So after inserting the iframe with a button to open the OneDrive Picker and selecting a file, the popup window persists with just a spinner icon and there is an error in the console r is null. I know that, given this question having a form can cause this issue and I removed the form in the page loaded in the iframe but still see the error where window.opener == null (see screenshot below). Has anybody else seen this before? I had a theory that the query parameters in the URL was the cause but removing those didn't appear to resolve the issue.

Debugging onedrive.js when error occurs (and popup window persists after selecting a file):

Thanks!

解决方案

So the cause was that the iframe was being loaded in a "popover" - a div with absolute positioning that appears when a link is clicked and then disappears after the interaction is over. And when the containing div is hidden, it is causing the iframe to reload - you should try a technique descibed here

这篇关于为什么OneDrive js选择器有时会有空开启器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆