I have the bizarre problem. When I click on a link in IE7 the window minimizes. It seems to only be a subset of the links on the page. It also doesn't consistently happen with the same link and differs from computer to computer.
example link text:<a hidefocus="on" href="#" tabindex="1"><span unselectable="on" id="extdd-102">Canadian Legislation</span></a>
Anyone seen this before or have any idea what might be causing it?
Finally figured it out. It was actually a custom JavaScript click handler that caused the problem.
My click handler was calling activeElement.blur();
on the current active element (so that events tied to blur fired when the elements were destroyed).
Problem is in IE, if you call blur on anything that isn't an INPUT, it minimizes the window.
I had the same issue on Internet Explorer 10.
This issue only happen when you invoke the blur() function on document.body element.
Issue can be reproduced simply executing
document.body.blur()in your browser console.
document.activeElement.blur() function invocation is the most common scenario in which this issue occurs because after first invocation of document.activeElement.blur() the body element will become the activeElement and subsequent call to document.activeElement.blur() will invoke blur on body element.
avoid document.body.blur() function invocation, if you have jquery you can introduce this simple logic
$(yourObj).is('body')
to check if your object is the body element, in order to avoid blur() function invocation on it
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With