Merge lp:~deryck/lazr-js/stop-all-those-null-choice-edit-icons into lp:lazr-js
Status: | Merged |
---|---|
Approved by: | Deryck Hodge |
Approved revision: | 188 |
Merged at revision: | 187 |
Proposed branch: | lp:~deryck/lazr-js/stop-all-those-null-choice-edit-icons |
Merge into: | lp:lazr-js |
Diff against target: |
15 lines (+4/-1) 1 file modified
src-js/lazrjs/choiceedit/choiceedit.js (+4/-1) |
To merge this branch: | bzr merge lp:~deryck/lazr-js/stop-all-those-null-choice-edit-icons |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Hummer (community) | Approve | ||
Review via email: mp+36494@code.launchpad.net |
Commit message
Ensure NullChoiceSource widget does not continue to append remove icons with each click to open the widget.
Description of the change
This fixes bug 514190, which notes that every time you open and
close the milestone widget on a Launchpad bug page a bug, you get an
extra remove icon. This is because the widget didn't check to see
if the icon already existed before adding another. This branch
fixes that with a simple sniff of the string to see if we smell
"<img" or not.
I didn't add a test to this for a couple reasons.
1. It seems silly to test this to me
2. icons shouldn't be hardcoded, and therefore, not tested
There's much more work to make this null choice edit widget generic
and re-usable, but I wanted to fix the bug on Launchpad.
Thanks for the review!
Cheers,
deryck