Make WordPress Core

Opened 8 years ago

Closed 8 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:


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 8 years ago.

Download all attachments as: .zip

Change History (6)

#1 @dd32
8 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.

#2 @dd32
8 years ago

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

#3 @ocean90
8 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.

8 years ago

#4 @ocean90
8 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.

#5 @dd32
8 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.