Feb 17 Published in Releases , Gadgets , Developer tips by Andy  

Update: Amazon Sidebar Tool 1.05With the release of Internet Explorer 8 RC1, a new bug appeared in Amazon Sidebar Tool.  The issue causes the gadget to render incorrectly, with most of the content being offset by a certain number of pixels.  For those of you wondering how a new release of IE could affect sidebar gadgets, the simple explanation is that gadgets are powered by Internet Explorer.

We've seen this kind of bug before, in early versions of both Auction Sidebar Tool and National Lottery Results.  However, the fixes that were applied to those gadgets did not work when applied to Amazon Sidebar Tool.  I must admit, I was a little worried that we'd have to go back to the drawing board (quite literally) to resolve the problem.  In the end, some tests run by Law and I resulted in us producing a fix and everything seems just fine now.

Amazon Sidebar Tool users can download the fixed version from Windows Live Gallery.

If you'd like to read more information about the bug and how to fix it (if you're a developer), hit the read link.

The original issue in AuctionST and National Lottery Results were caused by a combination of a DOCTYPE, the default margin on the body element and other elements that were set to the full width of the gadget (whether absolutely positioned or not).  After some discussion with another gadget developer from the MSDN forums, Jonathan Abbott, he discovered a fix that worked for National Lottery Results but not AuctionST.  He also documented the issue and the fix on the known bugs list:

Issue #53: Setting a DOCTYPE can cause a Gadget to scroll within its window when a scroll event occurs, if the document body margin style is not set to 0. Events such as middle mouse button scrolling (horizonal or vertical) can cause the issue.

As I mentioned, the suggested fixes didn't work for AmazonST, the body already had 0px set for the margin. There were a few ways of going about a fix. Setting the scrollTop and scrollLeft properties on the documentElement object worked after everything was rendered. The best fix was to put a handler for the window.onscroll event:

  1. // Bug fix for IE8 RC1
  2. window.onscroll = function () { window.scrollTo(0,0); }

Trackback(0)

TrackBack URI for this entry

Comments (0)

Subscribe to this comment's feed

Write comment

smaller | bigger
security image
Write the displayed characters

busy

Syndication

RSS Feed

Tag Cloud