From: Andrew Dolgov Date: Thu, 25 Jul 2013 10:20:42 +0000 (+0400) Subject: workaround for resetting panel size cookies (closes #756) X-Git-Tag: 1.10~66 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1966e05457ebb537f2bfd11d779cada2489bcf35;p=tt-rss.git workaround for resetting panel size cookies (closes #756) --- diff --git a/js/tt-rss.js b/js/tt-rss.js index 46e28235..04aec0cc 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")); + } }); });