Merge pull request #4711 from uclixnjupyternbaccessibility/issue-4006

Solved Issue #4006
This commit is contained in:
Thomas Kluyver 2019-06-25 16:23:07 +02:00 committed by GitHub
commit 60c17ed9a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -234,6 +234,8 @@ define(['jquery',
});
modal_obj.on('shown.bs.modal', function(){ editor.refresh(); });
modal_obj.on('hide.bs.modal', function(){
options.edit_metadata_button ? options.edit_metadata_button.focus() : "";});
};
var edit_attachments = function (options) {

View File

@ -10,7 +10,7 @@ define([
var CellToolbar = celltoolbar.CellToolbar;
var raw_edit = function (cell) {
var raw_edit = function (cell , edit_metadata_button) {
dialog.edit_metadata({
md: cell.metadata,
callback: function (md) {
@ -18,7 +18,8 @@ define([
},
name: i18n.msg._('Cell'),
notebook: this.notebook,
keyboard_manager: this.keyboard_manager
keyboard_manager: this.keyboard_manager,
edit_metadata_button: edit_metadata_button
});
};
@ -28,9 +29,10 @@ define([
.addClass("btn btn-default btn-xs")
.text(i18n.msg._("Edit Metadata"))
.click( function () {
raw_edit(cell);
raw_edit(cell, this);
return false;
});
button_container.append(button);
};