简体   繁体   English

window.open始终在Mobile Safari for iPad中打开新选项卡

[英]window.open always opens new tab in Mobile Safari for iPad

My company is using Karmasoft's UltimateEditor to allow for rich text in textarea fields as well as the ability to spellcheck. 我的公司正在使用Karmasoft的UltimateEditor来允许textarea字段中的富文本以及拼写检查的能力。

An issue we have run into is that on Safari for the iPad, the spellchecker is opening in a new tab instead of a new window on top of the current window. 我们遇到的一个问题是,在iPad的Safari上,拼写检查器在新选项卡中打开而不是在当前窗口顶部的新窗口中打开。

I have tried looking at the Safari settings to see if I could find a "Open pages in tabs instead of windows" setting, which exists in Safari for Windows, but I can't find a similiar setting for Safari on the iPad. 我已经尝试查看Safari设置,看看我是否可以在Safari for Windows中找到“在标签而不是Windows中打开页面”设置,但我在iPad上找不到类似于Safari的设置。

I asked on http://apple.stackexchange.com , and the basic answer was that this is just how it works in the iPad because "There is no concept of windows in Safari for iOS, so a new tab is all you get" 我问http://apple.stackexchange.com ,基本的答案是这就是它在iPad中的工作方式,因为“在Safari for iOS中没有Windows的概念,所以你得到一个新标签”

Has anyone else experience this problem, and have they found a way around it? 有没有其他人遇到这个问题,他们找到了解决方法吗? The UltimateEditor plugin uses window.open() to open the spell check window. UltimateEditor插件使用window.open()打开拼写检查窗口。

That's how mobile safari works. 这就是移动safari的工作原理。 You can't open a "mini window" like you can in a non-mobile environment. 您无法在非移动环境中打开“迷你窗口”。

What you can consider doing is overriding the window.open function to instead open a div with an iframe in it. 您可以考虑做的是覆盖window.open函数,而不是打开一个带有iframe的div。 How that will propagate down and affect the editor, I don't know. 我不知道如何传播并影响编辑器。 You also have the option of trying to override the editor's method of pulling up the spellchecker directly if that's easier. 您还可以选择尝试覆盖编辑器直接提取拼写检查器的方法,如果这更容易的话。 I've taken both routes and, depending on the component, each path can be easier than the other. 我已经采用了两种路线,并且根据组件,每条路径都比另一条路径更容易。 It just really depends on the component you're editing. 它实际上取决于您正在编辑的组件。

See this SO thread for an example of overwriting window.open: How to override the window.open functionality? 请参阅此SO线程以获取覆盖window.open的示例: 如何覆盖window.open功能?

I realize this isn't the straight forward answer you were probably looking for, but having done this before I think it's going to be the path you'll have to take. 我意识到这不是你可能正在寻找的直截了当的答案,但在我认为这将成为你必须采取的道路之前已经做到了这一点。 Either override window.open or start modifying the editor object directly. 覆盖window.open或直接开始修改编辑器对象。 Or option three, find another editor. 或选项三,找到另一个编辑器。

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

相关问题 最大化时,Window.open在safari中打开新标签页 - Window.open opens new tab in safari when maximized 带有'noopener'的Window.open打开一个新窗口而不是一个新选项卡 - Window.open with 'noopener' opens a new window instead of a new tab window.open打开一个新选项卡而不是一个新窗口(在chrome中) - window.open opens a new tab instead of a new window (in chrome) Window.open 无缘无故地打开一个空白的新标签 - Window.open opens a blank empty new tab for no reasons 在iPad Safari上window.open无法正常工作 - window.open not working as expected on iPad Safari window.open 在新的 window 中打开,而不是使用“nofollow/赞助”时的新标签 - window.open opens in new window instead of new tab when using "nofollow/sponsored" Selenium IE驱动程序将打开新窗口,而不是window.open()上的新选项卡 - Selenium IE Driver opens new window instead of a new tab on window.open() Chrome:window.open会打开新标签而不是新的弹出窗口 - Chrome: window.open opens new tab instead of new popup window window.open(url,windowname,opts)在新选项卡中打开,而不是在Firefox中打开新窗口 - window.open(url, windowname, opts) opens in new tab instead of new window in Firefox 函数中的window.open替换当前选项卡以及打开新选项卡 - window.open in a function replaces current tab as well as opens new tab
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM