René's URL Explorer Experiment


Title: Keyboard events: keydown filtering example can't block IME-composed input (Korean/Japanese/Chinese) · Issue #3978 · javascript-tutorial/en.javascript.info · GitHub

Open Graph Title: Keyboard events: keydown filtering example can't block IME-composed input (Korean/Japanese/Chinese) · Issue #3978 · javascript-tutorial/en.javascript.info

X Title: Keyboard events: keydown filtering example can't block IME-composed input (Korean/Japanese/Chinese) · Issue #3978 · javascript-tutorial/en.javascript.info

Description: Article Keyboard: keydown and keyup — the "Default actions" section, phone-number filter example: Problem The example (and the surrounding text) i...

Open Graph Description: Article Keyboard: keydown and keyup — the "Default actions" section, phone-number filter example: Problem ...

X Description: Article Keyboard: keydown and keyup — the "Default actions" section, phone-number filter example: <input onkeydown="return checkPhoneKey(event.key)" placeholder="Phone, ...

Opengraph URL: https://github.com/javascript-tutorial/en.javascript.info/issues/3978

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Keyboard events: keydown filtering example can't block IME-composed input (Korean/Japanese/Chinese)","articleBody":"## Article\n\n[Keyboard: keydown and keyup](https://javascript.info/keyboard-events) — the \"Default actions\" section, phone-number filter example:\n\n```html\n\u003cinput onkeydown=\"return checkPhoneKey(event.key)\" placeholder=\"Phone, please\" type=\"tel\"\u003e\n```\n\n## Problem\n\nThe example (and the surrounding text) implies that returning `false` from `keydown` reliably prevents unwanted characters from being entered. That holds for direct (Latin) keyboard input, but not for languages typed through an IME (Input Method Editor), such as Korean, Japanese and Chinese.\n\nWith an IME active:\n\n- `keydown` fires with `event.key == \"Process\"` (and `keyCode` 229), not the actual character.\n- More importantly, calling `preventDefault()` / returning `false` on that `keydown` does **not** cancel the text insertion, because the character is produced by the IME composition, not by the key's default action.\n\nAs a result, Korean/Japanese/Chinese characters pass straight through the filter and appear in the field. This was reported by a Korean reader of the Korean translation (ko.javascript.info), and is easy to reproduce by switching to a Korean IME and typing into the demo.\n\n## Suggestion\n\nAdd a short note after the example, along these lines:\n\n\u003e Please note: this filter only works for direct keyboard input. Text composed via an IME (used for languages such as Korean, Japanese or Chinese) is inserted by the input method, not by the key's default action, so it can't be blocked in `keydown`. That's one more reason why, for tracking or validating what actually gets into the field, the `input` event is a better choice.\n\nThis ties in nicely with the introduction of the article, which already recommends the `input` event for tracking input from any source.\n\nHappy to send a PR if the note sounds good.\n","author":{"url":"https://github.com/Violet-Bora-Lee","@type":"Person","name":"Violet-Bora-Lee"},"datePublished":"2026-07-18T18:27:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/3978/en.javascript.info/issues/3978"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:874ed3ef-89ad-ec1d-7a46-640af4f58ee6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id965C:1DD66:561DEA:7A444D:6A62FF71
html-safe-nonce8aeb97287c9cb43c3060459c865a48b1f9efff5c56fca13f463807752ce11ced
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjVDOjFERDY2OjU2MURFQTo3QTQ0NEQ6NkE2MkZGNzEiLCJ2aXNpdG9yX2lkIjoiMzUxNDU3OTg5MTk0OTYwMDYyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc9617710cef99ae2252f782d7e4268a5dfd313fb174010f182a1863b469861d7
hovercard-subject-tagissue:4919522579
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/javascript-tutorial/en.javascript.info/3978/issue_layout
twitter:imagehttps://opengraph.githubassets.com/04b0ccaf3b51945a2ad78cbf31f8cbb16b3dccf9450acd8395989be17c7d492f/javascript-tutorial/en.javascript.info/issues/3978
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/04b0ccaf3b51945a2ad78cbf31f8cbb16b3dccf9450acd8395989be17c7d492f/javascript-tutorial/en.javascript.info/issues/3978
og:image:altArticle Keyboard: keydown and keyup — the "Default actions" section, phone-number filter example: Problem ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameViolet-Bora-Lee
hostnamegithub.com
expected-hostnamegithub.com
None14517cd57568049be7ed25bfe9708f10d1e36b7254adfd920dfb9d44bcc71c41
turbo-cache-controlno-preview
go-importgithub.com/javascript-tutorial/en.javascript.info git https://github.com/javascript-tutorial/en.javascript.info.git
octolytics-dimension-user_id49552305
octolytics-dimension-user_loginjavascript-tutorial
octolytics-dimension-repository_id93253246
octolytics-dimension-repository_nwojavascript-tutorial/en.javascript.info
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id93253246
octolytics-dimension-repository_network_root_nwojavascript-tutorial/en.javascript.info
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4b2ed33e3827bc186c45c037f9274b5493aaca4c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/javascript-tutorial/en.javascript.info/issues/3978#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavascript-tutorial%2Fen.javascript.info%2Fissues%2F3978
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavascript-tutorial%2Fen.javascript.info%2Fissues%2F3978
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=javascript-tutorial%2Fen.javascript.info
Reloadhttps://github.com/javascript-tutorial/en.javascript.info/issues/3978
Reloadhttps://github.com/javascript-tutorial/en.javascript.info/issues/3978
Reloadhttps://github.com/javascript-tutorial/en.javascript.info/issues/3978
Please reload this pagehttps://github.com/javascript-tutorial/en.javascript.info/issues/3978
javascript-tutorial https://github.com/javascript-tutorial
en.javascript.infohttps://github.com/javascript-tutorial/en.javascript.info
Notifications https://github.com/login?return_to=%2Fjavascript-tutorial%2Fen.javascript.info
Fork 4k https://github.com/login?return_to=%2Fjavascript-tutorial%2Fen.javascript.info
Star 25.4k https://github.com/login?return_to=%2Fjavascript-tutorial%2Fen.javascript.info
Code https://github.com/javascript-tutorial/en.javascript.info
Issues 249 https://github.com/javascript-tutorial/en.javascript.info/issues
Pull requests 288 https://github.com/javascript-tutorial/en.javascript.info/pulls
Discussions https://github.com/javascript-tutorial/en.javascript.info/discussions
Actions https://github.com/javascript-tutorial/en.javascript.info/actions
Security and quality 0 https://github.com/javascript-tutorial/en.javascript.info/security
Insights https://github.com/javascript-tutorial/en.javascript.info/pulse
Code https://github.com/javascript-tutorial/en.javascript.info
Issues https://github.com/javascript-tutorial/en.javascript.info/issues
Pull requests https://github.com/javascript-tutorial/en.javascript.info/pulls
Discussions https://github.com/javascript-tutorial/en.javascript.info/discussions
Actions https://github.com/javascript-tutorial/en.javascript.info/actions
Security and quality https://github.com/javascript-tutorial/en.javascript.info/security
Insights https://github.com/javascript-tutorial/en.javascript.info/pulse
Keyboard events: keydown filtering example can't block IME-composed input (Korean/Japanese/Chinese)https://github.com/javascript-tutorial/en.javascript.info/issues/3978#top
https://github.com/Violet-Bora-Lee
Violet-Bora-Leehttps://github.com/Violet-Bora-Lee
on Jul 18, 2026https://github.com/javascript-tutorial/en.javascript.info/issues/3978#issue-4919522579
Keyboard: keydown and keyuphttps://javascript.info/keyboard-events
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.