diff --git a/cataloguing/value_builder/cn_browser.pl b/cataloguing/value_builder/cn_browser.pl index 0a0ca0669b..5619a68a3c 100755 --- a/cataloguing/value_builder/cn_browser.pl +++ b/cataloguing/value_builder/cn_browser.pl @@ -39,16 +39,16 @@ function Click$function_name(ev) { let window_height = screen.height; q = document.getElementById(ev.data.id); - if(Cookies.get(\"popup_window_height\") && Cookies.get(\"popup_window_width\")){ - window_width = Cookies.get(\"popup_window_width\"); - window_height = Cookies.get(\"popup_window_height\"); + if(localStorage.getItem(\"popup_window_height\") && localStorage.getItem(\"popup_window_width\")){ + window_width = localStorage.getItem(\"popup_window_width\"); + window_height = localStorage.getItem(\"popup_window_height\"); } var windowref = window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=cn_browser.pl&popup&q=\"+encodeURIComponent(q.value),\"cnbrowser\",\"width=\"+window_width+\"\,height=\"+window_height+\"\,toolbar=false,scrollbars=yes\"); windowref.onresize = function(){ - Cookies.set(\"popup_window_height\", windowref.innerHeight, { path: '/', sameSite: 'Lax' }); - Cookies.set(\"popup_window_width\", windowref.innerWidth, { path: '/', sameSite: 'Lax' }); + localStorage.setItem(\"popup_window_height\", windowref.innerHeight); + localStorage.setItem(\"popup_window_width\", windowref.innerWidth); } } diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index 3403b54768..b660011277 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -504,6 +504,8 @@ function logOut() { localStorage.removeItem("patron_search_selections"); localStorage.removeItem("item_search_selections"); localStorage.removeItem("copiedPermissions"); + localStorage.removeItem("popup_window_width"); + localStorage.removeItem("popup_window_height"); // Remove DataTables states Object.keys(localStorage).forEach(k => {