Skip to content

Commit 16db6bf

Browse files
committed
Swapped out "visibility: hidden" for "display: none" on tag loading elements to prevent any affect on the page layout (#163)
1 parent b2a9dbd commit 16db6bf

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/preloadjs/net/TagRequest.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ this.createjs = this.createjs || {};
8282
this._addedToDOM = false;
8383

8484
/**
85-
* Determines what the tags initial style.visibility was, so we can set it correctly after a load.
86-
*
85+
* Determines what the tags initial style.display was, so we can set it correctly after a load.
86+
* @property _startTagDisplay
8787
* @type {null}
8888
* @private
8989
*/
90-
this._startTagVisibility = null;
90+
this._startTagDisplay = null;
9191
};
9292

9393
var p = createjs.extend(TagRequest, createjs.AbstractRequest);
@@ -193,12 +193,12 @@ this.createjs = this.createjs || {};
193193
};
194194

195195
p._hideTag = function() {
196-
this._startTagVisibility = this._tag.style.visibility;
197-
this._tag.style.visibility = "hidden";
196+
this._startTagDisplay = this._tag.style.display;
197+
this._tag.style.display = 'none';
198198
};
199199

200200
p._showTag = function() {
201-
this._tag.style.visibility = this._startTagVisibility;
201+
this._tag.style.display = this._startTagDisplay;
202202
};
203203

204204
/**

0 commit comments

Comments
 (0)