Changed timeout code to event based
Этот коммит содержится в:
@@ -65,10 +65,13 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
// Timeout exists for the DOM to fully render before making changes
|
// Timeout exists for the DOM to fully render before making changes
|
||||||
var self = this
|
var self = this
|
||||||
setTimeout(function initialScroll() {
|
function initialScroll() {
|
||||||
self.holdPosition = false;
|
self.holdPosition = false;
|
||||||
self.scrollWindow();
|
self.scrollWindow();
|
||||||
}, 1);
|
$(document).off('DOMContentLoaded', initialScroll)
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('DOMContentLoaded', initialScroll);
|
||||||
|
|
||||||
// Handle browser resizing
|
// Handle browser resizing
|
||||||
$(window).resize(this.onResize);
|
$(window).resize(this.onResize);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user