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

[vscode] webview active state is bogus if iframe is focused #5521

Closed
akosyakov opened this issue Jun 19, 2019 · 5 comments
Closed

[vscode] webview active state is bogus if iframe is focused #5521

akosyakov opened this issue Jun 19, 2019 · 5 comments
Assignees
Labels
bug bugs found in the application shell issues related to the core shell vscode issues related to VSCode compatibility webviews issues related to webviews

Comments

@akosyakov
Copy link
Member

The shell cannot detect that the webview widget is active then webview iframe is selected. The check should be based on document.activeElement to produce reliable results.

@akosyakov akosyakov added bug bugs found in the application vscode issues related to VSCode compatibility webviews issues related to webviews labels Jun 19, 2019
@akosyakov akosyakov self-assigned this Jun 19, 2019
@akosyakov akosyakov added the shell issues related to the core shell label Jun 19, 2019
@akosyakov
Copy link
Member Author

Not sure how approach is properly. It would be nice to fix in the shell, right now webviews with focused iframe are not highlighted as active, the same for the mini browser. It seems to be a generic shell issue.

@akosyakov
Copy link
Member Author

Open an issue in phosphorjs phosphorjs/phosphor#394 to learn their opinion.

@akosyakov
Copy link
Member Author

akosyakov commented Jun 19, 2019

The only reliable way to get whether iframe is focused, it actually listens for it inside iframe and then forward events to the host window. After that we will need to have a custom shell focus tracker which is aware of these events as well. cc @svenefftinge @spoenemann @kittaakos Maybe other ideas?

@spoenemann
Copy link
Contributor

it actually listens for it inside iframe

Seems unfeasible.

Maybe other ideas?

We could ignore the blur event?

@akosyakov
Copy link
Member Author

We could ignore the blur event?

I've tried it does not work, there is not focus event afterwards. I'm thinking to go with #5560 (comment)

akosyakov added a commit that referenced this issue Oct 30, 2019
Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Oct 30, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Oct 30, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 1, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 7, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 7, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 8, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 11, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 11, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 11, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit to akosyakov/theia that referenced this issue Nov 11, 2019
…g is focused in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit to akosyakov/theia that referenced this issue Nov 13, 2019
…g is focused in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 13, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 13, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 14, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 14, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 15, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 16, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 16, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 18, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 19, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 21, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 21, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 21, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Nov 22, 2019
…in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit to akosyakov/theia that referenced this issue Feb 24, 2020
…g is focused in iframe

Otherwise the webview is not detected as active and title actions are not available.

Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application shell issues related to the core shell vscode issues related to VSCode compatibility webviews issues related to webviews
Projects
None yet
Development

No branches or pull requests

2 participants