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

WordPress Trac noreply at wordpress.org
Thu Mar 3 11:44:37 UTC 2022


#54548: The Close on Escape "feature" on the admin comments page is annoying
-------------------------+-------------------------------------------------
 Reporter:  BettyJJ      |       Owner:  alexstine
     Type:  defect       |      Status:  accepted
  (bug)                  |
 Priority:  normal       |   Milestone:  6.0
Component:  Comments     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  ui, accessibility, javascript,
                         |  administration
-------------------------+-------------------------------------------------

Comment (by afercia):

 Testing a bit the latest patch, I noticed a couple issues:
 - The close on Escape feature works also for the 'Quick Edit' textarea so
 the text of the JavaScript confirmation wouldn't be fully appropriate, as
 it refers only to 'Reply'.
 - More importantly: when editing multiple comments, there will be multiple
 JavaScript confirmation dialog. I think this is because of the way the JS
 event is currently attached to the textarea, which doesn't seem ideal.
 This would need some more refactoring to be solved, which is something I'd
 not recommend. To reproduce:
   - Apply the latest patch and build.
   - Reply to (or Quick Edit) a comment.
   - Enter some text.
   - Press the Escape key.
   - Click OK in the JavaScript confirm dialog.
   - Reply to another comment (or even to the same comment).
   - Enter some text.
   - Press the Escape key.
   - Click OK in the JavaScript confirm dialog.
   - At this point, you will get one more confirm dialog.
   - Repeat the steps above a few times and you will get as many confirm
 dialog as the amount of times you replied to a comment.

 Thinking a bit at the patch approach, I'd like to propose a new direction.
 After all, pressing Escape is generally used in software to 'cancel' the
 current operation. In this context, it does the same thing the 'Cancel'
 button (the one placed after the textarea) does. I'm not sure we should
 change this behavior.

 Instead, I'd say the actual problem that needs to be solved is the issue
 with Input Method Editor (IME) converters. Will submit a patch shortly.

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


More information about the wp-trac mailing list