Override mouse position when clicking on user in userlist to open dropdown at correct position

This commit is contained in:
Jérémie Astori 2017-12-16 15:40:46 -05:00
parent ee7272305a
commit 81e1d15ee9
No known key found for this signature in database
GPG key ID: B9A4F245CD67BDE8

View file

@ -103,7 +103,11 @@ exports.handleKeybinds = function(input) {
const user = input.closest(".users").find(".user.active");
if (user.length) {
user.click();
const clickEvent = new $.Event("click");
const userOffset = user.offset();
clickEvent.pageX = userOffset.left;
clickEvent.pageY = userOffset.top + user.height();
user.trigger(clickEvent);
}
});
};