Closed Bug 494452 Opened 17 years ago Closed 17 years ago

[preview] "Search for addons" text is taken as vars

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
minor

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: aakashd, Assigned: lorchard)

References

()

Details

Attachments

(1 file, 1 obsolete file)

Note: This works fine when a user clicks on the text field first (which will make it blank). Steps to reproduce 1. Go to the URL 2. Click on the green" button on the search box in the new AMO without click in the text field. Actual Results: "Search for addons" taken as a parameter Expected Results: the parameter should not be taken and it isn't in the current AMO site.
Component: Search Plugins → Public Pages
QA Contact: search-plugins → web-ui
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → 5.0.6
Just need to copy this to the amo2009 search element I'm guessing
Assignee: nobody → lorchard
I couldn't find the JS handling this in the old layout, so I threw this together. Without JS enabled, the search field should stay empty or populated with the previous search on search results page. With JS enabled, an empty search field will get "search for add-ons", which will be deleted if the field is clicked or if the form is submitted.
Attachment #379234 - Flags: review?(clouserw)
Comment on attachment 379234 [details] [diff] [review] Use JS to insert instructional phrase, and remove it on submit or search field click The old code is in mozilla.thtml on line 185 but if I remember correctly it's doing some crazy floating label stuff. I'm r-ing this because it doesn't replace "search for add-ons" on blur if nothing else is entered. I know it's picky.
Attachment #379234 - Flags: review?(clouserw) → review-
Made a few tweaks from the original, hopefully this does it
Attachment #379234 - Attachment is obsolete: true
Attachment #379931 - Flags: review?(clouserw)
Attachment #379931 - Flags: review?(clouserw) → review+
checked in as r26449
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Verified FIXED -- I played with onblur() and it seems to do the right thing wrt onfocus() clearing the textfield and onblur() restoring the text, and the search query is correct (https://preview.addons.mozilla.org/en-US/firefox/search?q=&cat=all) per the testcase in comment 0.
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: