WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#14312 closed defect (bug) (fixed)

Pressing Enter in the Add New Category textbox on the New Post page cases the post to be published

Reported by: ahockley Owned by: nacin
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.0
Component: Editor Keywords: has-patch gsoc needs-testing
Focuses: Cc:

Description

Using the textbox in the post editor window to add a new category, after typing in the category name I pressed "Enter", assuming that would activate the "Add" button to add the category. Instead, it activated the "Publish" button.

This could cause users to prematurely publish posts (it did to me).

Attachments (2)

14312.diff (1.1 KB) - added by wojtek.szkutnik 5 years ago.
14312.2.diff (629 bytes) - added by wojtek.szkutnik 5 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 @Viper007Bond5 years ago

  • Keywords needs-patch added

@wojtek.szkutnik5 years ago

comment:2 follow-up: @wojtek.szkutnik5 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords has-patch gsoc needs-testing added; needs-patch removed

Here you go

comment:3 in reply to: ↑ 2 @Viper007Bond5 years ago

Replying to wojtek.szkutnik:

Here you go

Wouldn't it be better to do this in one of the existing Javascript files? Seems... inelegant to do it inline.

@wojtek.szkutnik5 years ago

comment:4 @wojtek.szkutnik5 years ago

Indeed, the second one looks better. Press This uses inline javascript for such things, but clearly the second option is better.

comment:5 @dd325 years ago

  • Keywords 3.2-early added
  • Milestone changed from Awaiting Review to Future Release

Ran across this bug a few minutes ago.

comment:6 @nacin3 years ago

  • Keywords 3.2-early removed
  • Milestone changed from Future Release to 3.5

Just hit this bug.

comment:7 @nacin3 years ago

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

In [21970]:

Hitting return when adding a new category from the category meta box should add the new category, not submit the post form. props wojtek.szkutnik, fixes #14312.

comment:8 @ocean903 years ago

#17342 was marked as a duplicate.

comment:9 @SergeyBiryukov3 years ago

#15809 was marked as a duplicate.

Note: See TracTickets for help on using tickets.