<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -436,13 +436,19 @@ var Cufon = (function() {
 	function HoverHandler() {
 
 		function contains(node, anotherNode) {
-			if (node.contains) return node.contains(anotherNode);
-			return node.compareDocumentPosition(anotherNode) &amp; 16;
+			try {
+				if (node.contains) return node.contains(anotherNode);
+				return node.compareDocumentPosition(anotherNode) &amp; 16;
+			}
+			catch(e) {} // probably a XUL element such as a scrollbar
+			return false;
 		}
 
 		function onOverOut(e) {
 			var related = e.relatedTarget;
-			if (!related || contains(this, related)) return;
+			// there might be no relatedTarget if the element is right next
+			// to the window frame
+			if (related &amp;&amp; contains(this, related)) return;
 			trigger(this, e.type == 'mouseover');
 		}
 </diff>
      <filename>js/cufon.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f4ceb9158ba264ace5373ac64072dd30c50166b9</id>
    </parent>
  </parents>
  <author>
    <name>Simo Kinnunen</name>
    <email>simo@shoqolate.com</email>
  </author>
  <url>http://github.com/sorccu/cufon/commit/ca1e322b8da98da1fce40412a684acd55afde850</url>
  <id>ca1e322b8da98da1fce40412a684acd55afde850</id>
  <committed-date>2009-11-08T17:21:42-08:00</committed-date>
  <authored-date>2009-11-08T17:21:42-08:00</authored-date>
  <message>Hover now works more reliably with links that are right next to window frame. Thanks Hannu!</message>
  <tree>784da42c040bf42e039d612642ce9f8f3eabda6b</tree>
  <committer>
    <name>Simo Kinnunen</name>
    <email>simo@shoqolate.com</email>
  </committer>
</commit>
