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

Input cursor invisible after navigation in webview #14474

Open
christophpre opened this Issue Sep 6, 2018 · 8 comments

Comments

7 participants
@christophpre
Copy link

christophpre commented Sep 6, 2018

  • Output of node_modules/.bin/electron --version: v3.0.0-beta.9
  • Operating System (Platform and Version): Windows 10 10.0.16299 Build 16299 and MacOS High Sierra 10.13.6
  • Output of node_modules/.bin/electron --version on last known working Electron version (if applicable): v2.0.8

Expected Behavior
If I navigate inside a webview on a page, the position cursor should still be visible when input fields have focus.

Actual behavior
If I navigate inside a webview on a page, the position cursor is invisible. Typing is still possible though.

To Reproduce

  1. webview.loadUrl('http://www.google.com') or set src attribute
  2. In google search for something and press enter.
  3. On the results page, when the searchfield is focused, the cursor is not visible.

Can be reproduced on any webpage.

Screenshots
image
image

Additional Information
If the BrowserWindow is minimized and restored, the cursor becomes visible again.

@javan

This comment has been minimized.

Copy link
Contributor

javan commented Sep 12, 2018

There are number of issues with focus and selection within <webview>s. See #4539 (comment) for a somewhat related discussion.

@codebytere codebytere moved this from Needs Review to Doesn't Block in 3.0.x Sep 12, 2018

@steverandy

This comment has been minimized.

Copy link

steverandy commented Sep 13, 2018

I'm seeing similar issue on v3.0.0-beta.12 too.

@kempy007

This comment has been minimized.

Copy link

kempy007 commented Sep 13, 2018

Plus another 1

@kempy007

This comment has been minimized.

Copy link

kempy007 commented Sep 13, 2018

platform/linux

@kempy007

This comment has been minimized.

Copy link

kempy007 commented Sep 13, 2018

If you go to where electron window opens and click in the input field, it begins to show in the client, not sure if that will help.

@omarkilani

This comment has been minimized.

Copy link

omarkilani commented Sep 26, 2018

+1 from Remember The Milk. We've been trying to work around this with a liberal application of webview.focus() everywhere but there are edge cases where it doesn't quite work 100%.

@steverandy

This comment has been minimized.

Copy link

steverandy commented Sep 29, 2018

I'm using this as temporary solution:

webviewElement.addEventListener("load-commit", this.handleLoadCommit);

handleLoadCommit(event) {
  // Invoke webview blur here as temp fix for focus issue
  // https://github.com/electron/electron/issues/14474
  invoke(this.webviewRef.current, "blur");
}
@andrewpaprotsky

This comment has been minimized.

Copy link

andrewpaprotsky commented Oct 1, 2018

Here's a workaround that we use for now:

  webview.addEventListener("dom-ready", event => {
    // Remove this once https://github.com/electron/electron/issues/14474 is fixed
    webview.blur();

    webview.focus();
  });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment