CEF doesn't properly capture certain characters (Cyrillic uppercase "Л")
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
- Enable browser logging:
setDevelopmentMode(true, true); - Create any kind of browser and add text input to it;
- Focus that input;
- 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
- [X] I have read and understood the Security Policy and this issue is not security related.
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.
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).
Just tested on nightly build r22485 and issue is gone