@@ -745,7 +745,6 @@ PivotView.prototype.recalculateSizes = function (container) {
745745
746746 var _ = this ,
747747 CLICK_EVENT = this . controller . CONFIG [ "triggerEvent" ] || "click" ,
748- IE_EXTRA_SIZE = window . navigator . userAgent . indexOf ( "MSIE " ) > - 1 ? 1 / 3 : 0 ,
749748 header = container . getElementsByClassName ( "lpt-headerValue" ) [ 0 ] ;
750749
751750 if ( ! header ) { return ; } // pivot not ready - nothing to fix
@@ -835,6 +834,19 @@ PivotView.prototype.recalculateSizes = function (container) {
835834 console . warn ( "No _primaryRows property in container, cell sizes won't be fixed." ) ;
836835 }
837836
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+
838850 container . parentNode . removeChild ( container ) ; // detach
839851
840852 topHeader . style . marginLeft = headerW + "px" ;
@@ -895,11 +907,15 @@ PivotView.prototype.recalculateSizes = function (container) {
895907 if ( pTableHead . childNodes [ i ] . firstChild ) {
896908 pTableHead . childNodes [ i ] . firstChild . style . height =
897909 ( columnHeights [ i ] || columnHeights [ i - 1 ] || DEFAULT_CELL_HEIGHT )
898- + IE_EXTRA_SIZE
899910 + "px" ;
900911 }
901912 }
902913
914+ // #keepSizes
915+ keepSizes . forEach ( function ( o ) {
916+ o . el . style . height = parseInt ( o . height ) + "px" ;
917+ } ) ;
918+
903919 containerParent . appendChild ( container ) ; // attach
904920
905921 /*
0 commit comments