From fa11110d49e570b5837da1d56556aa2acbfbdde6 Mon Sep 17 00:00:00 2001 From: Joe Lencioni Date: Tue, 27 Jan 2015 17:34:55 -0800 Subject: [PATCH] Fix Waypoint in Firefox The span that Waypoint renders to the page is rendered differently in Firefox than Chrome. In Chrome, it has a height of 0, whereas in Firefox it has a height that matches its font-size. This caused height calculations in our specs to be off by 16px in Firefox. Giving this element a font-size of 0 resolves this issue. --- src/waypoint.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/waypoint.js b/src/waypoint.js index 9993028..504de27 100644 --- a/src/waypoint.js +++ b/src/waypoint.js @@ -138,7 +138,7 @@ var Waypoint = React.createClass({ render: function() { // We need an element that we can locate in the DOM to determine where it is // rendered relative to the top of its context. - return React.createElement('span'); + return React.createElement('span', { style: { fontSize: 0 } }); } });