Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webview: sometimes focus is not passed to editor when clicked into #64729

Closed
bpasero opened this issue Dec 10, 2018 · 4 comments
Closed

webview: sometimes focus is not passed to editor when clicked into #64729

bpasero opened this issue Dec 10, 2018 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded webview Webview issues

Comments

@bpasero
Copy link
Member

bpasero commented Dec 10, 2018

Extracted from #56988 (comment)

Steps to Reproduce:

  1. install negokaz.live-server-preview
  2. have below HTML file
  3. "Show Live Server Preview"
  4. click into the preview on the right and left a couple of times

=> 🐛 at some point the editor focus is not detected, even though we clicked into the webview

before

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug webview Webview issues electron-3.0.x-update labels Dec 10, 2018
@bpasero
Copy link
Member Author

bpasero commented Dec 12, 2018

@mjbvz mjbvz added this to the December/January 2019 milestone Dec 18, 2018
@mjbvz
Copy link
Collaborator

mjbvz commented Dec 18, 2018

I could not get focus-change to work reliably.

The issue here seems to be that this extension is using an iframe inside of the webview.However they are also using the old vscode.previewHtml command instead the new webview API: negokaz/vscode-live-server-preview#14

Not sure if using previewHtml makes any difference but I'll test an iframe using the webview api

@mjbvz mjbvz closed this as completed in 2608420 Dec 18, 2018
@mjbvz
Copy link
Collaborator

mjbvz commented Dec 18, 2018

The only way I could find to reliably track focus for webview contents that include iframes is polling. If you have any other ideas here, please let me know as I'm not a fan of this solution

@bpasero
Copy link
Member Author

bpasero commented Dec 19, 2018

@mjbvz maybe leave in a todo for you to check back on that workaround, it is possible that the webview might get fixes in the future. At least we should check when we update to Electron 4.

I also could not find any good solution and it seems others are having issues too.

@chrmarti chrmarti added the verified Verification succeeded label Jan 31, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded webview Webview issues
Projects
None yet
Development

No branches or pull requests

3 participants