mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Give the document focus on save dialog open to resolve inspectors
Bug: 60837 Change-Id: I624a76f5d09db270e651ac004813acfba249f5f6
This commit is contained in:
parent
831141e692
commit
c95e404a30
|
@ -1088,10 +1088,12 @@ ve.init.mw.ViewPageTarget.prototype.setupSaveDialog = function () {
|
||||||
* @method
|
* @method
|
||||||
*/
|
*/
|
||||||
ve.init.mw.ViewPageTarget.prototype.showSaveDialog = function () {
|
ve.init.mw.ViewPageTarget.prototype.showSaveDialog = function () {
|
||||||
|
// Focus the surface to make sure any open inspectors are closed
|
||||||
|
this.surface.getView().focus();
|
||||||
|
|
||||||
// Preload the serialization
|
// Preload the serialization
|
||||||
var doc = this.surface.getModel().getDocument();
|
|
||||||
if ( !this.docToSave ) {
|
if ( !this.docToSave ) {
|
||||||
this.docToSave = ve.dm.converter.getDomFromModel( doc );
|
this.docToSave = ve.dm.converter.getDomFromModel( this.surface.getModel().getDocument() );
|
||||||
}
|
}
|
||||||
this.prepareCacheKey( this.docToSave );
|
this.prepareCacheKey( this.docToSave );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue