|
Feb
17
Published in
Releases , Gadgets , Developer tips by
Andy
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:
Set as favorite
Bookmark
Email this
Hits: 35496 Trackback(0)TrackBack URI for this entryComments (0)Subscribe to this comment's feedWrite comment |
SyndicationRSS FeedTag Cloud |