From 1966e05457ebb537f2bfd11d779cada2489bcf35 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 25 Jul 2013 14:20:42 +0400 Subject: [PATCH] workaround for resetting panel size cookies (closes #756) --- js/tt-rss.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/tt-rss.js b/js/tt-rss.js index 46e282351..04aec0cca 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -573,13 +573,17 @@ function init_second_stage() { var tmph = dojo.connect(dijit.byId('feeds-holder'), 'resize', function (args) { - setCookie("ttrss_fh_width", args.w, getInitParam("cookie_lifetime")); + if (args && args.w >= 0) { + setCookie("ttrss_fh_width", args.w, getInitParam("cookie_lifetime")); + } }); var tmph = dojo.connect(dijit.byId('content-insert'), 'resize', function (args) { - setCookie("ttrss_ci_width", args.w, getInitParam("cookie_lifetime")); - setCookie("ttrss_ci_height", args.h, getInitParam("cookie_lifetime")); + if (args && args.w >= 0 && args.h >= 0) { + setCookie("ttrss_ci_width", args.w, getInitParam("cookie_lifetime")); + setCookie("ttrss_ci_height", args.h, getInitParam("cookie_lifetime")); + } }); });