WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#12152 closed defect (bug) (fixed)

"Add tag" popup overwrites existing textbox content

Reported by: htoomik Owned by: ocean90
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9.1
Component: JavaScript Keywords: has-patch
Focuses: Cc:

Description

Steps to reproduce:
I am entering tags in the Post tags section of the Edit post page and have entered multiple tags in the textbox.
I pause in the middle of a word.
A little box pops up below the textbox, suggesting existing tags that match what I have typed.
I click the tag in the popup.

Expected behaviour: the tag I clicked is added to the list, overwriting everything after the last comma in the textbox.
Actual behaviour: the tag I clicked overwrites everything I had already typed.

Example: I have typed "weather,winter,snow,sw". The popup comes up suggesting "sweden".
Expected textbox content: "weather,winter,snow,sweden".
Actual textbox content: "sweden".

Attachments (1)

12152.patch (1.2 KB) - added by ocean90 5 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 @dd325 years ago

  • Component changed from General to JavaScript
  • Owner set to azaozz

Quick Note, This doesnt occur if you use the Delimiter ", " instead of simply ",".

Changing the .suggest() js calls to use "," as the MultiDelimiter doesnt seem to help this case however. It appears that this is a bug within jquery.suggest to me.

comment:2 @dd325 years ago

I tested using Opera 10.10, incase it makes a difference.

comment:3 @ocean905 years ago

  • Keywords needs-patch added
  • Milestone changed from Unassigned to 3.0
  • Owner changed from azaozz to ocean90
  • Status changed from new to accepted

I'm for a wontfix.
Suggest can only handle one delimiter, it would be find if it can support ", " and "," but in this case it's ", ". If we use "," as delimiter we get problemes with the old delimiter.

@ocean905 years ago

comment:4 @ocean905 years ago

  • Keywords has-patch added; needs-patch removed

In 12152.patch we can handle now both delimiter, default is "," but you can use ", " too.

comment:5 @dd325 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [14387]) Handle ", " and "," in non-hierarchical term suggestion. Props ocean90. Fixes #12152

Note: See TracTickets for help on using tickets.