JavaScript used to increment a counter increments by two instead of one.



15 years ago
4 years ago


(Reporter: tomdkat, Unassigned)





(2 attachments)



15 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040316
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040316

Ok, when I try to purchase some detergent from, I locate the item
and click the plus sign icon to increment the quantity to 1.  Instead it
increments to 2. I then use the minus sign icon to decrement the quantity to 1
and it decrements to 0.

Reproducible: Always
Steps to Reproduce:
1.Go to
2.Login to the site
3.Search for "All detergent"
4.Choose one detergent for testing and click the plus sign to increment the
quantity to 1 and the quantity should appear as 2.

Actual Results:  
The increment/decrement by 1 increments/decrements by 2 instead.

Expected Results:  
The increment/decrement by 1 should increment/decrement only by one.

This works fine in IE 6 on Windows XP Home Edition and behaves as described
above in Mozilla 1.6 and Mozilla 1.7b on Windows XP, Mozilla 1.7b on Linux and
Firefox Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040317

Comment 1

15 years ago
Created attachment 144416 [details]
HTML testcase from site.

The ZIP file attachment contains the complete HTML for a product detail page,
which also exhibits the same misbehavior described in this bug report.

Comment 2

15 years ago
testcase was saved as "Webpage, HTML only", should have been saved as "Webpage,
complete". It contains a lot of scripts, but more are missing, like
<script src="/superstore/actionmenu/buttons.js"></script>
<script src="/superstore/productlist.js"></script>
<script src="/superstore/gw_productlist.js"></script>
<script src="/superstore/buy.js"></script>


Comment 3

15 years ago
Created attachment 144437 [details]
Safeway test case saved as "web page complete"

Ok, the original test case page appeared in a popup window. I've saved that
popup window page using the "Web Page Complete" option, as requested.

Comment 4

15 years ago
the site uses generated javascript (gw_productlist.js: RenderProductRow) that
creates an image with a link and onclick handler.  Then, in hbe-11up.js, they
(for reasons beyond me) attempt to sniff out links and process them via
javascript.  The functions $x, $v and $t effectively do this:

for(var b=0; b<document.links.length; b++){
   eval("document.links[b].onmousedown=function(){ return

So each links onclick handler gets doubled as an onmousedown handler.  Surprise,
surprise the desired effect is doubled.

==> Evang.
Assignee: general → english-us
Component: JavaScript Engine → English US
Ever confirmed: true
Product: Browser → Tech Evangelism
QA Contact: pschwartau → english-us
Version: Trunk → unspecified

Comment 5

15 years ago
This problem did NOT happen with Mozilla 1.7-rc3 on Windows XP Home Edition, so
I'm not sure if the site changed or what.  :)


Comment 6

15 years ago
thanks, Tom.

I don't think Mozilla's behavior changed (I still see the problem with a
testcase from what you attached).

resolving as FIXED.
Last Resolved: 15 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.