From b270424a149771d7382f4af379e6b3ef5a5c7ee3 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Thu, 17 Oct 2013 15:04:35 +0000 Subject: [PATCH] only scroll if text is selected --- static/js/textPanel.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/textPanel.js b/static/js/textPanel.js index 36f9a376..1817d454 100644 --- a/static/js/textPanel.js +++ b/static/js/textPanel.js @@ -312,7 +312,8 @@ pandora.ui.textHTML = function(text) { }) .appendTo($content); - scrollTo(pandora.user.ui.texts[pandora.user.ui.text].position || 0); + pandora.user.ui.texts[pandora.user.ui.text] && + scrollTo(pandora.user.ui.texts[pandora.user.ui.text].position || 0); function getHeight() { // 24 menu + 24 toolbar + 16 statusbar + 32 title + 32 margins