From 727fe14c2ee0cffac8bd90e7794bd915e4783086 Mon Sep 17 00:00:00 2001 From: Ricky Ramirez Date: Wed, 9 Oct 2013 16:48:07 -0700 Subject: [PATCH] r.ui.Bubble: Don't position a Bubble off screen. --- r2/r2/public/static/js/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/public/static/js/ui.js b/r2/r2/public/static/js/ui.js index 8029381f5..d0187ad77 100644 --- a/r2/r2/public/static/js/ui.js +++ b/r2/r2/public/static/js/ui.js @@ -183,7 +183,7 @@ r.ui.Bubble = Backbone.View.extend({ offsetX = this.$parent.outerWidth(true) - this.$el.outerWidth(true) offsetY = this.$parent.outerHeight(true) + 5 this.$el.css({ - left: parentPos.left + offsetX, + left: Math.max(parentPos.left + offsetX, 0), top: parentPos.top + offsetY - bodyOffset.top }) } else if (this.$el.is('.anchor-right')) {