Give the document focus on save dialog open to resolve inspectors

Bug: 60837
Change-Id: I624a76f5d09db270e651ac004813acfba249f5f6
This commit is contained in:
Ed Sanders 2014-02-12 14:14:23 +00:00
parent 831141e692
commit c95e404a30

View file

@ -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 );