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

CEF doesn't properly capture certain characters (Cyrillic uppercase "Л") #3218

Closed
1 task done
JeViCo opened this issue Oct 23, 2023 · 3 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@JeViCo
Copy link

JeViCo commented Oct 23, 2023

Describe the bug

CEF acts weird when trying to type a capital cyrillic letter "Л" into the focused input. It doesn't happen with any other cyrillic or latin letter. I don't know if there's more letters like this in other languages.

It could be reproduced in both GUI and non GUI browsers. Tested on local server on Win10 and Win11. It doesn't happen on Win7 though.

Steps to reproduce

  1. Enable browser logging: setDevelopmentMode(true, true);
  2. Create any kind of browser and add text input to it;
  3. Focus that input;
  4. Try typing any letter and then a capital letter "Л".

It could be easily detected by using:

function onDOMContentLoaded() {
    const myInput = document.querySelector(".myInput"); // use querySelector or getElementById

    elements.input.addEventListener("keydown", (e) => console.log(1, e.key));
    document.addEventListener("keypress", (e) => console.log(2, e.key));
}
document.addEventListener("DOMContentLoaded", onDOMContentLoaded);

AND

elements.input.addEventListener("input", (e) => console.log(3, event.target.value));

OR (equivalent to previous one)

<input type="text" class="myInput" oninput="console.log(this.value)" />

Version

Client: v1.6-release-22268, Win10 & Win11

Additional context

No response

Relevant log output

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.
@JeViCo JeViCo added the bug Something isn't working label Oct 23, 2023
@JeViCo JeViCo changed the title CEF prevents from inputting certain keys CEF doesn't properly capture certain characters (Cyrillic uppercase "Л") Oct 27, 2023
@TMachadoDev
Copy link

Hey There,

function onDOMContentLoaded() {
    const myInput = document.querySelector(".myInput"); 

    // observe any unusual behavior
    myInput.addEventListener("keydown", (e) => {
        console.log("Keydown event:", e.key, e.keyCode);
    });

    myInput.addEventListener("keypress", (e) => {
        console.log("Keypress event:", e.key, e.keyCode);
    });

    // track changes in the input value
    myInput.addEventListener("input", (e) => {
        console.log("Input event:", e.target.value);
    });
}

document.addEventListener("DOMContentLoaded", onDOMContentLoaded);
  • If doesn't work, try to see if it has something to do with the enconding, by default it comes "utf-8", check that on your html file in the head tag.

@alexeev-igor
Copy link

Hi, I had same problem with CEF WPF until I upgraded CEF to the latest version (122.1.12+g6e69d20+chromium-122.0.6261.112).

@JeViCo
Copy link
Author

JeViCo commented Jun 3, 2024

Just tested on nightly build r22485 and issue is gone

@JeViCo JeViCo closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants