#42234 closed defect (bug) (fixed)
New tag should be added at the `keypress` event instead of `keyup`
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 4.9 | Priority: | normal |
| Severity: | normal | Version: | 4.9 |
| Component: | Taxonomy | Keywords: | has-patch has-screenshots |
| Focuses: | Cc: |
Description (last modified by )
keyup event will be always fired when Japanese kanji will be submitted.
The event should be changed from keyup to keypress.
Related: #42233
Attachments (4)
Change History (20)
@
8 years ago
It's to reproduce this problem, I made mistake after.gif is a movie after fix this problem. :)
#2
follow-up:
↓ 7
@
8 years ago
Sorry, I made a mistake in order to upload files... :)
- before.gif - It is a gif animation to reproduce this problem.
- after.gif - It is a gif animation after solved the problem.
Japanese kanji has to be confirmed by enter key.
keyup event will fire then, but keypress or keydown will never been fire when we confirm kanji.
Another place for example theme customizer are using keypress or keydown, so adding tag should use keypress too.
#3
@
8 years ago
- Component changed from Editor to I18N
- Keywords has-screenshots added
- Version set to trunk
#4
@
8 years ago
Hi!
It is the same situation as # 42233. ( @miyauchi also writes.)
Press Enter Key to confirm.
The issue with Japanese input.
Japanese input has a meaning of selection with the Enter key, but when the Enter key press that will decide Add.
I confirmed that #42233 solve with 4.9 Beta3.
I hope the same problem will be solved as well.
This ticket was mentioned in Slack in #core by miyauchi. View the logs.
8 years ago
#6
@
8 years ago
@westonruter Since you worked on #42233, would you mind having a look at this one as well?
#8
@
8 years ago
@SergeyBiryukov
I tried them to develop simple app. keypress.gif is a screencast for it.
https://miya0001.github.io/japanese-input/
They are almost same but I guess keypress would be better.
Also, /wp-admin/nav-menus.php is using keypress.
Unfortunately, I tried keypress on [41873] but it wasn't fired, so we are using keydown on [41873].
Thanks :)
#10
@
8 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 41988:
#11
@
8 years ago
See discussion starting from https://core.trac.wordpress.org/ticket/38922#comment:37 about how this change broke the previous behavior. There are now 2 keypress on the same input but more importantly there's now the need to press Enter twice to add a term. Previously, one Enter key press was enough because the term was added when releasing the Enter key (on keyup). There's the need of a different solution. Not reopening this ticket because it was closed on a completed milestone.
This ticket was mentioned in Slack in #core-editor by jeffpaul. View the logs.
8 years ago
#13
@
7 years ago
@afercia
Gutenberg project is trying to detect Japanese IME with KeyboardEvent.isComposing on following PR.
https://github.com/WordPress/gutenberg/pull/11908
I guess keypress can be changed to keyup if we use KeyboardEvent.isComposing.
This is just a quick note, I hope it will help.
#14
@
7 years ago
@miyauchi very interesting, thank you! Will open a new ticket to follow your suggestion. A few references:
Browsers support:
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/isComposing#Browser_compatibility
More details:
https://www.w3.org/TR/uievents/#events-composition-types
It's a screencast to reproduce this problem.