Auto-focus on location input when opening the link inspector, auto focus on surface view input when closing

This commit is contained in:
Trevor Parscal 2011-12-09 20:41:40 +00:00
parent 49041942cc
commit 4b764f7524

View file

@ -54,6 +54,7 @@ es.LinkInspector.prototype.onOpen = function() {
if ( title !== null ) {
this.$locationInput.val( title );
}
this.$locationInput.focus();
};
es.LinkInspector.prototype.onClose = function() {
@ -75,6 +76,7 @@ es.LinkInspector.prototype.onClose = function() {
{ 'type': 'link/internal', 'data': { 'title': title } }
);
surfaceModel.transact( set );
surfaceView.$input.focus();
};
/* Inheritance */