Permalink
Browse files

Fix for older versions of Firefox

  • Loading branch information...
1 parent d43747b commit 30b75cabc2f587b6af940919ba21e457ea58921b @barryvan committed Feb 27, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 Source/Slick/Slick.Finder.js
@@ -214,6 +214,7 @@ local.setDocument = function(document){
// IE8 does not have .contains on document.
return context === node || ((context === document) ? document.documentElement : context).contains(node);
} : (root && root.compareDocumentPosition) ? function(context, node){
+ if (node === null) return false; /* Fix for Firefox 5 throwing NS_ERROR_ILLEGAL_VALUE when calling compareDocumentPosition(null) */
return context === node || !!(context.compareDocumentPosition(node) & 16);
} : function(context, node){
if (node) do {

0 comments on commit 30b75ca

Please sign in to comment.