WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 23 months ago

#42234 closed defect (bug)

New tag should be added at the `keypress` event instead of `keyup` — at Version 9

Reported by: miyauchi 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 SergeyBiryukov)

keyup event will be always fired when Japanese kanji will be submitted.
The event should be changed from keyup to keypress.

Related: #42233

Change History (13)

@miyauchi
3 years ago

#1 @miyauchi
3 years ago

  • Keywords has-patch added

@miyauchi
3 years ago

It's a screencast to reproduce this problem.

@miyauchi
3 years ago

It's to reproduce this problem, I made mistake after.gif is a movie after fix this problem. :)

#2 follow-up: @miyauchi
3 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 @miyauchi
3 years ago

  • Component changed from Editor to I18N
  • Keywords has-screenshots added
  • Version set to trunk

#4 @nukaga
3 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.


3 years ago

#6 @swissspidy
3 years ago

@westonruter Since you worked on #42233, would you mind having a look at this one as well?

#7 in reply to: ↑ 2 @SergeyBiryukov
3 years ago

  • Milestone changed from Awaiting Review to 4.9

Replying to miyauchi:

Another place for example theme customizer are using keypress or keydown, so adding tag should use keypress too.

[41873] used keydown, should we be using keydown here as well instead of keypress?

@miyauchi
3 years ago

Dump keycode for Japanese input

#8 @miyauchi
3 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 :)

Last edited 3 years ago by SergeyBiryukov (previous) (diff)

#9 @SergeyBiryukov
3 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.