https://codepen.io/tats-u/pen/VYZBEWM (simple Markdown-to-HTML playground)
The following process doesn't work in Chromium. Works in Firefox as intended. Which behavior is correct?
document.addEventListener("DOMContentLoaded", () => {
const textArea = document.querySelector("textarea");
textArea.addEventListener("input", (event) => {
if (event.isComposing) { // skip while IME input because it's half-baked
return;
}
// your process here
});
});
Reproduction:
- Open https://codepen.io/tats-u/pen/VYZBEWM in a Chromium-based browser
- Turn your IME on (e.g. Google Japanese Input / Microsoft Japanese Input)
- Input some Japanese using IME
- Press Enter to commit
- Firefox: the rendered HTML will be changed
- Chromium: HTML is will not be changed