[wp-trac] [WordPress Trac] #54548: The Close on Escape "feature" on the admin comments page is annoying

WordPress Trac noreply at wordpress.org
Wed Dec 1 08:08:16 UTC 2021

#54548: The Close on Escape "feature" on the admin comments page is annoying
 Reporter:  BettyJJ                         |      Owner:  (none)
     Type:  defect (bug)                    |     Status:  new
 Priority:  normal                          |  Milestone:  Awaiting Review
Component:  General                         |    Version:
 Severity:  normal                          |   Keywords:
  Focuses:  ui, javascript, administration  |
 If you reply to a comment from the admin page, whenever you press the esc
 key, all you have written is lost. Without any warning. What a horrible
 user experience. I honestly don't understand why this was implemented as a
 feature in the first place.
 This is especially problematic for users with IME, eg. users who type
 Chinese and Japanese, because esc is used more frequently in the typing
 process than that of English.
 The culprit is in wp-admin/js/edit-comments.js:
 $('#replycontent').trigger( 'focus' ).on( 'keyup', function(e){
         if ( e.which == 27 )
                 commentReply.revert(); // Close on Escape.
 I want to propose to just get rid of it. If we want to make it better,
 maybe show a warning before throwing away what was written, or remember
 the content so that the content will be still there if the user wants to

 I searched and there does not seem to be a recommended way to override
 core js functions. So I either have to modify the file every time WP
 updates, or make the change I want into core. So here I'm opening this

Ticket URL: <https://core.trac.wordpress.org/ticket/54548>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list