mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Auto-focus on location input when opening the link inspector, auto focus on surface view input when closing
This commit is contained in:
parent
49041942cc
commit
4b764f7524
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue