Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmd/Ctrl clicking folders no longer opens in new tabs in 5.3 #3276

Closed
parente opened this issue Jan 29, 2018 · 4 comments · Fixed by #3282
Closed

Cmd/Ctrl clicking folders no longer opens in new tabs in 5.3 #3276

parente opened this issue Jan 29, 2018 · 4 comments · Fixed by #3282

Comments

@parente
Copy link
Member

parente commented Jan 29, 2018

Instead, the file browser navigates to the folder in the current browser pane.

Probably related to the new history navigation feature. JS might be eating the hotkey modifier preventing the default browser behavior.

@takluyver
Copy link
Member

Oh, I hadn't checked that because I use middle click to open in a new tab. I think you're right about the cause.

@parente
Copy link
Member Author

parente commented Jan 29, 2018

No worries. One of our users caught it after we rolled it out internally.

@takluyver
Copy link
Member

takluyver commented Jan 29, 2018

Want to do a PR? The handler is here:

link.click(function (e) {
window.history.pushState({
path: model.path
}, model.path, utils.url_path_join(
that.base_url,
'tree',
utils.encode_uri_components(model.path)
));
that.update_location(model.path);
return false;
});

And we should probably do the same with the breadcrumb handlers:

var root = $('<li/>').append('<a href="/tree"><i class="fa fa-folder"></i></a>').click(function(e) {
var path = '';
window.history.pushState({
path: path
}, 'Home', utils.url_path_join(that.base_url, 'tree'));
that.update_location(path);
return false;
});
breadcrumb.append(root);
var path_parts = [];
this.notebook_path.split('/').forEach(function(path_part) {
path_parts.push(path_part);
var path = path_parts.join('/');
var url = utils.url_path_join(
that.base_url,
'/tree',
utils.encode_uri_components(path)
);
var crumb = $('<li/>').append('<a href="' + url + '">' + path_part + '</a>').click(function(e) {
window.history.pushState({
path: path
}, path, url);
that.update_location(path);
return false;
});

@parente
Copy link
Member Author

parente commented Jan 29, 2018

I was planning to dig into it tomorrow evening. If someone else gets to it before me, no worries.

@takluyver takluyver added this to the 5.5 milestone Feb 2, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants