Skip to content

Commit f0ee02f

Browse files
committed
Use _new_window method for "Download as .ipynb"
1 parent e9c9c3a commit f0ee02f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

notebook/static/notebook/js/menubar.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,15 @@ define([
172172
this.element.find('#download_ipynb').click(function () {
173173
var base_url = that.notebook.base_url;
174174
var notebook_path = utils.encode_uri_components(that.notebook.notebook_path);
175-
var w = window.open('');
176175
var url = utils.url_path_join(
177176
base_url, 'files', notebook_path
178177
) + '?download=1';
179178
if (that.notebook.dirty && that.notebook.writable) {
180179
that.notebook.save_notebook().then(function() {
181-
w.location = url;
180+
that._new_window(url);
182181
});
183182
} else {
184-
w.location = url;
183+
that._new_window(url);
185184
}
186185
});
187186

0 commit comments

Comments
 (0)