WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#30345 closed defect (bug) (fixed)

Quick edit: form submitted when activating Cancel via keyboard

Reported by: afercia Owned by: SergeyBiryukov
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.0
Component: Quick/Bulk Edit Keywords: has-patch dev-feedback
Focuses: ui, accessibility, javascript Cc:

Description

Post listings > any post > Quick Edit

  • edit any field (change the title, add a category, whatever)
  • focus the "Cancel" link with your keyboard
  • press Enter

You would expect to "Cancel" your changes, but you've just saved them instead.

There's a keydown event listening on the whole td containing the form elements, not sure it's a good thing. I can understand this was meant to speed up editing, however we should exclude at least the "Cancel" link.

Attachments (1)

30345.patch (478 bytes) - added by afercia 4 years ago.

Download all attachments as: .zip

Change History (5)

@afercia
4 years ago

#1 @afercia
4 years ago

  • Keywords has-patch added

#2 @afercia
3 years ago

  • Keywords dev-feedback added

#3 @SergeyBiryukov
3 years ago

  • Milestone changed from Awaiting Review to 4.2

#4 @SergeyBiryukov
3 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 31274:

Quick Edit: Don't save the post if Enter is pressed on the Cancel link.

props afercia.
fixes #30345.

Note: See TracTickets for help on using tickets.