]> source.dussan.org Git - jquery.git/commitdiff
offset: do not add borders for table cells
authorBrandon Aaron <brandon.aaron@gmail.com>
Tue, 18 Sep 2007 18:08:35 +0000 (18:08 +0000)
committerBrandon Aaron <brandon.aaron@gmail.com>
Tue, 18 Sep 2007 18:08:35 +0000 (18:08 +0000)
src/offset.js

index f59fb9b27caa565d414f4b759de81ecf351ac0e0..20805de1c7d3b94f76095e8cf2178f7983f2547f 100644 (file)
@@ -43,7 +43,7 @@ jQuery.fn.offset = function() {
                        
                                // Mozilla and Safari > 2 does not include the border on offset parents
                                // However Mozilla adds the border for table cells
-                               if ( mozilla && /^t[d|h]$/i.test(parent.tagName) || !safari2 )
+                               if ( mozilla && !/^t[d|h]$/i.test(offsetParent.tagName) || safari && parseInt(version) >= 522 )
                                        border( offsetParent );
                                
                                // Safari <= 2 doubles body offsets with an absolutely positioned element or parent