Make WordPress Core

Opened 2 months ago

Last modified 8 weeks ago

#54548 accepted defect (bug)

The Close on Escape "feature" on the admin comments page is annoying

Reported by: BettyJJ Owned by: alexstine
Milestone: 6.0 Priority: normal
Severity: normal Version:
Component: Comments Keywords: needs-patch
Focuses: ui, accessibility, javascript, administration Cc:

Description

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 resume.

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.

Change History (4)

#1 @sabernhardt
2 months ago

  • Component changed from General to Comments
  • Focuses accessibility added

#2 @sabernhardt
2 months ago

function originally added in [8720]; the latest code can be found in edit-comments.js

Related: #30979

This ticket was mentioned in Slack in #accessibility by alexstine. View the logs.


8 weeks ago

#4 @alexstine
8 weeks ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.0
  • Owner set to alexstine
  • Status changed from new to accepted
Note: See TracTickets for help on using tickets.