Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stick to bottom when opening user list #1032

Merged
merged 1 commit into from Apr 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/js/lounge.js
Expand Up @@ -729,6 +729,7 @@ $(function() {
var self = $(this);
viewport.toggleClass(self.attr("class"));
e.stopPropagation();
chat.find(".chan.active .chat").trigger("msg.sticky");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was expecting that if I was not stick'ed to bottom and clicked on the user list button this would force-stick me but it doesn't.
It works as expected, i.e. sticks you to bottom only if you were before clicking, but I can't figure out why. Do you happen to know what magic is this, @xPaw? If I read this correctly, any click should stick you to bottom regardless of scroll position before clicking.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the expected behaviour, that event only keeps at the bottom.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yes, but that's not what I meant. Probably explained myself poorly.

Let's put it that way: go to a channel, scroll all the way up, then click on the user list button. According to this change, I'm reading that this should force the window to go stickied to bottom, even though you probably don't want that if you weren't at the bottom before clicking. But this behavior doesn't happen, user stays at the top. This is great, you don't want to get moved to bottom if you weren't before, but I don't understand how that's possible.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

});

function positionContextMenu(that, e) {
Expand Down Expand Up @@ -822,7 +823,7 @@ $(function() {
+ Math.round(parseFloat(style.borderBottomWidth) || 0)
) + "px";

$("#chat .chan.active .chat").trigger("msg.sticky"); // fix growing
chat.find(".chan.active .chat").trigger("msg.sticky"); // fix growing
})
.tab(complete, {hint: false});

Expand Down