跨域子帧中的窗体控件上的自动对焦被阻止 [英] Blocked autofocusing on a form control in a cross-origin subframe

查看:1480
本文介绍了跨域子帧中的窗体控件上的自动对焦被阻止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Chrome,当我尝试更改服务器上另一个应用的IFrame中的输入值时,Chrome出现错误:

Using Chrome, when I'm trying to change values of an input located in an IFrame of another app on our server, I get an error in Chrome:

跨域子帧中的表单控件被阻止自动聚焦."

"Blocked autofocusing on a form control in a cross-origin subframe."

在生产环境中(当两个应用程序托管在同一个域中时)可以正常工作,但是在localhost开发中,我无法使其正常工作.

On production (when the two apps are hosted on the same domain) it's working, but on localhost development I can't make it to work.

我已经尝试通过以下方式启动Chrome:

I've already tried starting Chrome with the following:

  • -disable-web-security
  • -ignore-certificate-errors
  • -disable-site-isolation-trials
  • -allow-external-pages
  • -禁用站点隔离策略

但无济于事.

有人知道如何使它起作用吗? 如果需要在服务器端进行任何更改,这也是一个选择.

Has anyone has an idea how to make it work? If any change on server side needed, it's also an option.

推荐答案

对我来说,问题是chrome扩展名(Dashlane).我在该网站上将其禁用,并且它正常工作.我不知道这是否对您有任何帮助,但我遇到了同样的问题,这对我有用.

For me the issue was a chrome extension ( Dashlane ). I disabled it on that site an it worked. I don't know if this helps you in any way but I had the same issue and this worked for me.

我在本地主机上也遇到了问题,但是还没有在服务器上尝试过.

edit: I also had the issue on localhost however haven't tried it yet on server.

这篇关于跨域子帧中的窗体控件上的自动对焦被阻止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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