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

Edge: Focus jumps back to browser control when trying to leave #1848

Open
sratz opened this issue Feb 20, 2025 · 0 comments · May be fixed by #1849
Open

Edge: Focus jumps back to browser control when trying to leave #1848

sratz opened this issue Feb 20, 2025 · 0 comments · May be fixed by #1849
Labels
edge Edge Browser

Comments

@sratz
Copy link
Member

sratz commented Feb 20, 2025

To Reproduce

  • Start with a simple eclipse installation (e.g. platform runtime binary)
  • Close welcome page
  • Open 'Internal Web Browser' view and move it to the editor area
  • Create a dummy project with a dummyFile.txt
  • Open that file
  • Switch to the browser tab
  • Press Ctrl-E -> switch to dummyFile.txt
  • Editor tab jumps to dummyFile.txt
  • Editor tab immediately jumps back to Browser

Screenshots

Image

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • All OS
    • Windows
    • Linux
    • macOS

Workaround (or) Additional context
The are much more situations where this occurs. The Ctrl-E is just a very easy one to reproduce.

The problem is the following:

  • When the Ctrl-E popup closes, focus is returned to SWT-Edge and we receive an SWT.FocusIn event (Edge.browserFocusIn(Event)).
  • We also need to inform WebView2 of this fact and call controller.MoveFocus(COM.COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC);
  • SWT switches to another editor
  • -----async----
  • Now, with an async delay, WebView2 informs us again in handleGotFocus that it has received focus.
  • We move focus to SWT-Browser again, even though this event is now obsolete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
edge Edge Browser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant