소스 검색

[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");