question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Hi: I installed the release 2.1698-vsc1.41.1, and I use this command and set a password to start it:

code-server --host 0.0.0.0 --port 8082

this is ok to run. But when i put it in iframe, when send the password will show this error on browser:

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

This seems to be a cross-domain issue,but I can’t found any setting to fix it. If you has any idea, please tell me. thanks you.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
merdelycommented, Feb 6, 2021

I don’t know if this helps you guys, but I wanted to give you guys some more information.

I access home assistant by https://ha.mydomain.inside:8123. I accessed VS Code by https://vscode.mydomain.inside When I have:

panel_iframe:
  vscode:
    title: VS Code
    url: "https://vscode.mydomain.inside"
    icon: si:visualstudiocode

This configuration exhibited the problem described above.

Here’s what I did yesterday:

  1. Created an nginx virtual host entry for ha.mydomain.inside on port 443
  2. Added the following for vscode under that virtual host entry:
  location /code-server/ {
    # "vscode:8080" is my nginx Docker instance connecting to my code-server Docker instance using Docker Compose
    proxy_pass http://vscode:8080/;
    # more nginx proxy options here
  }
  1. Updated my Home Assistant configuration with:
panel_iframe:
  vscode:
    title: VS Code
    url: "https://ha.mydomain.inside/code-server/"
    icon: si:visualstudiocode

So, since both Home Assistant and code-server are not running with the same hostname (ha.mydomain.inside), the problem goes away.

0reactions
warlordattackcommented, Jul 17, 2022

i have perhaps the same issue : impossible to login 2022-07-17_145025

Read more comments on GitHub >

github_iconTop Results From Across the Web

Blocked autofocusing on a form control in a cross-origin ...
Using Chrome, when I'm trying to change values of an input located in an IFrame of another app on our server, I get...
Read more >
Blocked autofocusing on a form control in a cross ... - GitHub
Actual behavior: The rocket Chat is giving us a cross error tryLogin. Blocked autofocusing on a form control in a cross-origin subframe.
Read more >
Blocked autofocusing on a form control in a cross ... - Syncfusion
Forum Thread - Blocked autofocusing on a form control in a cross-origin subframe. - JavaScript - EJ 2.
Read more >
Error Blocked autofocusing - Development - Rocket Chat forums
This error is caused by an input element (Username input of the login page for me) that has “autofocus” set to on. You...
Read more >
Autofocus form control in iframe - JSFiddle - Code Playground
Blocked autofocusing on a form control in a cross-origin subframe. 2. document.querySelector('input').focus();. CSS Tidy. xxxxxxxxxx.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found