Bug 21632 - card message preview link is broken due to toggleVisibility () function
Summary: card message preview link is broken due to toggleVisibility () function
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL: http://www.yahoo.com
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2008-10-15 17:37 PDT by jasneet
Modified: 2011-06-15 01:53 PDT (History)
2 users (show)

See Also:


Attachments
reduced testcase (2.50 KB, application/octet-stream)
2008-10-15 17:38 PDT, jasneet
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description jasneet 2008-10-15 17:37:55 PDT
I Steps:
1.Go to http://www.yahoo.com
2. Click on "Shopping" link on the left.
3. Type "Tulips" without quotes in that rectangle white box below the Home link. Then click the orange search button.
4. Click on the first image "Assorted Tulips' on the left.
5. Select calendar in step 3 and click Order Now green button.
6. Click on Next button and then Proceed As Guest button.
7. Fill out the Deliver form.
8. Once the form is completeldy filled it out. Click on Preview Card Message link.

II Issue:
The Card Message Preview link is broken.

III Conclusion:
The link to click to see the preview card is attached to a listener through the statement
       PRVD.CT.EVENTS.Event.addListener(this.PreviewLink, "click", this.ToggleVisibility, this, false);
in Views_CardMessagePreview.js. The listener is supposed to trigger toggleVisibility () function when the link is clicked.

When I add a try-catch block around the code that adds the listener, Safari and Chrome generate an error  and thus the toggleVisibility () function to show the preview does not get triggered.

IV Other Browsers:
IE7: ok
FF3: ok

V Nightly tested: 37604
Comment 1 jasneet 2008-10-15 17:38:46 PDT
Created attachment 24380 [details]
reduced testcase
Comment 2 Gavin Barraclough 2011-06-15 01:53:50 PDT
Following the steps to repro the bug, it looks like the content might have changed.  Having filled out the delivery card, I can't find a "Preview Card Message" link.

Based on the testcase, I'm guessing this may be a content bug.  The problem in the testcase is that in the file commonJS.js, in the function addListener, the code attempts to reference a variable '_48' that is never defined - this is an error.  This bug only affects Safari since the erroneous code is wrapped in a useLegacyEvent event check, which checks 'isSafari'.  :'-(

This issue could have been introduced in the reduction I guess? - hard to say, since a can't repro on the original site.

Since the content seems to have changed on the original site, and since the bug in the reduction is a content bug, I don't see any bugs here - works for me.