Skip to content

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

Closed

Description

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

Activity

  1. added
    bug
    webview
    on Dec 10, 2018
  2. mjbvz commented on Dec 18, 2018

    @mjbvz
    Contributor

    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

  3. mjbvz commented on Dec 18, 2018

    @mjbvz
    Contributor

    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

  4. bpasero commented on Dec 19, 2018

    @bpasero
    ContributorAuthor

    Matt Bierner (@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.

  5. locked and limited conversation to collaborators on Feb 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugverifiedwebview

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions