Closed Bug 759655 Opened 12 years ago Closed 12 years ago

pressing return to select a component from the product/component search doesn't work

Categories

(bugzilla.mozilla.org :: User Interface, defect)

Production
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: dkl)

References

Details

Attachments

(1 file)

pressing return to select a component from the product/component search doesn't work, it just closes the auto-complete menu.  you have to click on an item with the mouse.
Assignee: nobody → dkl
Status: NEW → ASSIGNED
This works well for me. I am going to test in IE to make sure it works but submitting for review now.

dkl
Attachment #628488 - Flags: review?(glob)
Should mention that this patch also works in GuidedBugEntry.
Just verified that this works in IE9 in both places.
Comment on attachment 628488 [details] [diff] [review]
Patch to allow hitting enter on an item in product autocomplete (v1)

Review of attachment 628488 [details] [diff] [review]:
-----------------------------------------------------------------

r=glob,
please fix the delimiter change on commit.

::: extensions/BMO/web/js/choose_product.js
@@ +25,4 @@
>        return YAHOO.lang.JSON.stringify(json_object);
>      },
>      resultListFormat : function(oResultData, enteredText, sResultMatch) {
> +        return _escapeHTML(oResultData[0]) + " / " + _escapeHTML(oResultData[1]);

please change the delimiter from " / " back to " :: ".
there are components which include /, which results in a confusing display:
eg. Mozilla Localizations / cy / Welsh
Attachment #628488 - Flags: review?(glob) → review+
Comment on attachment 628488 [details] [diff] [review]
Patch to allow hitting enter on an item in product autocomplete (v1)

On bmo 4.2, extensions/BMO/web/js/choose_product.js needs to be changed to use YAHOO.lang.escapeHTML() instead of _escapeHTML(), as the latter does not exist there.
Actually, I think bmo 4.0 branch is using a new enough YUI that you could just move completely to YAHOO.lang.escapeHTML() everywhere.
(In reply to Reed Loden [:reed] from comment #6)
> Actually, I think bmo 4.0 branch is using a new enough YUI that you could
> just move completely to YAHOO.lang.escapeHTML() everywhere.

agreed; looks like extensions/BMO/web/js/choose_product.js is the only place that uses _escapeHTML
(In reply to Reed Loden [:reed] from comment #5)
> On bmo 4.2, extensions/BMO/web/js/choose_product.js needs to be changed to
> use YAHOO.lang.escapeHTML() instead of _escapeHTML(), as the latter does not
> exist there.

Done. Thanks.

(In reply to Byron Jones ‹:glob› from comment #4)
> please change the delimiter from " / " back to " :: ".
> there are components which include /, which results in a confusing display:
> eg. Mozilla Localizations / cy / Welsh

Also changed this. Both will show up in the final commit.

dkl
Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.0
modified extensions/BMO/web/js/choose_product.js
Committed revision 8204.

Committing to: bzr+ssh://dlawrence%40mozilla.com@bzr.mozilla.org/bmo/4.2
modified extensions/BMO/web/js/choose_product.js
Committed revision 8182.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: