IE: links inside the page get lost

Gez Lemon's article Keyboard Navigation and Internet Explorer discusses a fix for a problem in Internet Explorer whereby the focus gets "lost" in IE if you use the tab key to jump to within-page links. The problem appears to be related to the Microsoft-only hasLayout property.

In modern browsers that don't have this weird feature, this page should allow you to tab to the link below, which will take a yellow background to show that it has focus (or is active, in IE).

Hitting enter should then put the focus in the third paragraph, and hitting tab again should take you to the final link on the page.

In IE6 and IE7, it doesn't; the last link is never reached, but the focus goes back to the start of the page. This has serious implications for those coding long pages with internal tables of content. Gez's article has workarounds.

Hit enter to activate this link.

Next paragraph is bypassed

Top Cat! The most effectual Top Cat! Who's intellectual close friends get to call him T.C., providing it's with dignity. Top Cat! The indisputable leader of the gang. He's the boss, he's a pip, he's the championship. He's the most tip top, Top Cat.

Paragraph below is the destination of the link above

This is the destination of the first link. Focus should go here. So hitting tab once again should take you to this link.