]> git.wh0rd.org Git - tt-rss.git/commitdiff
workaround for resetting panel size cookies (closes #756)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 25 Jul 2013 10:20:42 +0000 (14:20 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 25 Jul 2013 10:20:42 +0000 (14:20 +0400)
js/tt-rss.js

index 46e282351d595b95ca660e2b075836aa674c5c35..04aec0cca01fa284a42e9a30df2d9654dfbeab4c 100644 (file)
@@ -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"));
+                                       }
                        });
 
                });