@@ -745,7 +745,6 @@ PivotView.prototype.recalculateSizes = function (container) {
745
745
746
746
var _ = this ,
747
747
CLICK_EVENT = this . controller . CONFIG [ "triggerEvent" ] || "click" ,
748
- IE_EXTRA_SIZE = window . navigator . userAgent . indexOf ( "MSIE " ) > - 1 ? 1 / 3 : 0 ,
749
748
header = container . getElementsByClassName ( "lpt-headerValue" ) [ 0 ] ;
750
749
751
750
if ( ! header ) { return ; } // pivot not ready - nothing to fix
@@ -835,6 +834,19 @@ PivotView.prototype.recalculateSizes = function (container) {
835
834
console . warn ( "No _primaryRows property in container, cell sizes won't be fixed." ) ;
836
835
}
837
836
837
+ /**
838
+ * #keepSizes
839
+ * This fixes FF/IE strange issue that assigns, for example, "12.05" instead of "12" to
840
+ * the cell height and, as a result, row headers and rows are inconsistent.
841
+ * @type {Array }
842
+ */
843
+ var keepSizes = [ ] . slice . call ( leftHeader . getElementsByTagName ( "th" ) ) . map ( function ( e ) {
844
+ return {
845
+ el : e . getElementsByTagName ( "div" ) [ 0 ] ,
846
+ height : e . getElementsByTagName ( "div" ) [ 0 ] . offsetHeight
847
+ } ;
848
+ } ) ;
849
+
838
850
container . parentNode . removeChild ( container ) ; // detach
839
851
840
852
topHeader . style . marginLeft = headerW + "px" ;
@@ -895,11 +907,15 @@ PivotView.prototype.recalculateSizes = function (container) {
895
907
if ( pTableHead . childNodes [ i ] . firstChild ) {
896
908
pTableHead . childNodes [ i ] . firstChild . style . height =
897
909
( columnHeights [ i ] || columnHeights [ i - 1 ] || DEFAULT_CELL_HEIGHT )
898
- + IE_EXTRA_SIZE
899
910
+ "px" ;
900
911
}
901
912
}
902
913
914
+ // #keepSizes
915
+ keepSizes . forEach ( function ( o ) {
916
+ o . el . style . height = parseInt ( o . height ) + "px" ;
917
+ } ) ;
918
+
903
919
containerParent . appendChild ( container ) ; // attach
904
920
905
921
/*
0 commit comments