Loading...
Please wait...

Search

Mozilla Bug
Mozilla Bug: Runaway Javascript loop causing multiple stacked alert() windows

Contact: Clifford Barney (cbarney@cliffordbarney.com)
Date: Dec 21, 2005
Browser version: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

This javascript is part of an E-Commerce program that validates payment information, enabling a 'Submit Order' button. The Javascript checks a hidden field called 'customer_payment_id' and if no value is found, displays an alert that says 'Enter payment information above'. It then turns the button grey so that the customer has a visual indication that he can't submit order.

The problem is that if the 'Submit Order' button is position near the center of the page (horizontally and vertically), then the alert window appears and partially overlaps it. This overlapping causes the onMouseOver event to continuously fire, creating multiple stacked alert windows. Because they are stacked, the user only sees a single alert window that doesn't close no matter how many times he clicks the 'close' button.

Here's how to replicate the bug:

Using the right scrollbar, scroll the page down until the 'submit order' button is in the very center of the browser window (horizontally and vertically). Click the 'submit order' button. An alert pop-up will appear, but then you'll see the Firefox icon on the Taskbar (Windows XP) begin to flash, indicating that something is being loaded. If you click the 'close' button or the upper-right 'x' in the alert window, another immediately beneath it is revealed. If you grab the alert window and move it off to another part of the window, the entire stack of alert windows is revealed.

Here's now to replicate normal operation:

Scroll the page so that the 'submit order' button is NOT in the very center of the browser window. Click the 'submit order' button. A single alert pop-up will appear.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 







Customer Support
Live Chat
Send an eMail
1-800-YEL-DAWG
( 1-800-935-3294 )
Newsletter
Newsletter