correct positioning of user card on sites with custom headers

fix regression (can not click on links in card)
This commit is contained in:
Sam 2014-11-06 13:00:21 +11:00
parent 30ce67f689
commit e3bfc2e447
1 changed files with 4 additions and 1 deletions

View File

@ -31,7 +31,8 @@ export default Discourse.View.extend(CleansUp, {
if (self.get('controller.visible')) {
var $target = $(e.target);
if ($target.closest('[data-user-card]').data('userCard') ||
$target.closest('a.mention').length > 0) {
$target.closest('a.mention').length > 0 ||
$target.closest('#user-card').length > 0) {
return;
}
@ -75,6 +76,8 @@ export default Discourse.View.extend(CleansUp, {
position.left += overage;
position.top += target.height() + 5;
}
position.top -= $('#main-outlet').offset().top;
self.$().css(position);
}
}