Skip to content

Instantly share code, notes, and snippets.

@gabrielhpugliese
Last active December 25, 2015 02:29
Show Gist options
  • Select an option

  • Save gabrielhpugliese/6902766 to your computer and use it in GitHub Desktop.

Select an option

Save gabrielhpugliese/6902766 to your computer and use it in GitHub Desktop.
First one raises: Uncaught TypeError: Cannot read property 'win' of null Uncaught TypeError: Cannot read property 'delaylist' of null
Meteor.startup(function () {
Session.set('chatroomRendered', false);
});
Template.chatroom.rendered = function () {
Session.set('chatroomRendered', true);
};
Deps.autorun(function () {
if (Session.equals('chatroomRendered', false)) {
return;
}
$('#chat, #users-list').niceScroll({
autohidemode: false,
cursoropacitymin: 0.3,
cursoropacitymax: 0.3
});
});
Template.chatroom.destroyed = function () {
$('#chat, #users-list').getNiceScroll().hide();
Session.set('chatroomRendered', false);
};
Meteor.startup(function () {
Session.set('chatroomRendered', false);
});
Template.chatroom.rendered = function () {
Session.set('chatroomRendered', true);
};
Deps.autorun(function () {
if (Session.equals('chatroomRendered', false)) {
return;
}
Meteor.setTimeout(function () {
$('#chat, #users-list').niceScroll({
autohidemode: false,
cursoropacitymin: 0.3,
cursoropacitymax: 0.3
});
}, 500);
});
Template.chatroom.destroyed = function () {
$('#chat, #users-list').getNiceScroll().hide();
Session.set('chatroomRendered', false);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment