Преглед изворни кода

[notebook] Fix window.onbeforeunload

Enrico Berti пре 10 година
родитељ
комит
abe6f6b
1 измењених фајлова са 1 додато и 3 уклоњено
  1. 1 3
      desktop/libs/notebook/src/notebook/templates/editor_components.mako

+ 1 - 3
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -2027,9 +2027,7 @@ ${ require.config() }
 
       // Close the notebook snippets when leaving the page
       window.onbeforeunload = function (e) {
-        if (!isLoginRequired){
-          viewModel.selectedNotebook().close();
-        }
+        viewModel.selectedNotebook().close();
       };
 
       $(".preview-sample").css("right", (10 + $.scrollbarWidth()) + "px");