From 246f77c98d48df011a2e80ae5d33bee1104b6366 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 6 Nov 2014 16:25:40 +1100 Subject: [PATCH] tweak positioning when it has no room to right --- app/assets/javascripts/discourse/views/user-card.js.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/views/user-card.js.es6 b/app/assets/javascripts/discourse/views/user-card.js.es6 index 91649c483a0..96ef15947fd 100644 --- a/app/assets/javascripts/discourse/views/user-card.js.es6 +++ b/app/assets/javascripts/discourse/views/user-card.js.es6 @@ -73,8 +73,8 @@ export default Discourse.View.extend(CleansUp, { var overage = ($(window).width() - 50) - (position.left + width); if (overage < 0) { - position.left += overage; - position.top += target.height() + 5; + position.left -= (width/2) - 10; + position.top += target.height() + 8; } position.top -= $('#main-outlet').offset().top;