Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Final direction. And made sure it won't get removed during minification.
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Aug 20, 2019
1 parent 7941d61 commit 26ce76e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/imageupload/imageuploadediting.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export default class ImageUploadEditing extends Plugin {
return;
}

const domFigure = editor.editing.view.domConverter.mapDomToView( viewImg.parent );
const domFigure = editor.editing.view.domConverter.mapViewToDom( viewImg.parent );

if ( !domFigure ) {
return;
Expand All @@ -214,7 +214,8 @@ export default class ImageUploadEditing extends Plugin {

domFigure.style.display = 'none';

const offsetHeightBefore = domFigure.offsetHeight; // eslint-disable-line no-unused-vars
// Make sure this line will never be removed during minification for having "no effect".
domFigure._ckHack = domFigure.offsetHeight;

domFigure.style.display = originalDisplay;
} );
Expand Down

0 comments on commit 26ce76e

Please sign in to comment.